Hi
To make a canvas visible or invisible you just need to change the visible property or is there something else to do ?
because in my code below, setting the canvas1.visible=TRUE doesnt have any effect at all
any ideas ? thanks in advance
window1.canvas1.Visible=false ' hide before stretching n resizing canvas
Dim picFile as FolderItem
picFile=GetFolderItem (app.ImgFolder+f) ' imgfolder+f = img file path
Dim pic As Picture
pic = Picture.Open(picFile)
if pic =nil then
msgbox "Bad pic !"
else
' stretching n resizing code goes here
ElasticPict pic, window1.Canvas1
window1.canvas1.visible=true' eve if it's true the canvas remains invisible !!!!!
end if
Unless this code is in a thread that yields time back to the display, the effect of toggling visibility won’t show up. Basically, your entire method executes and then the display updates.
So if i want to change any proprieties of a canvas I have to do it from inside its paint event ??
How do I call this event ?
And what if this event raises during runtime and I dont need any changes to the canvas anymore?
I neeed to have a pic centered and proportiannly stretched on screen even when the user resizes and moves the window.
Maybe imagewell is easier/faster ?