Into an old Xojo project (not used since several years) I have now some troubles with the following point.
In my project I use a “scaledpicture” object which is a picture with some useful (for my project) properties and methods… In this picture I draw lines, etc… Till here all is ok.
Now in the user interface I try to display this scaledpicture into a dekstopcanvas (which was a canvas at the beginning). Whatever I try I get an arror at compile time… DrawPicture refuse to do that.
At the time I use this instruction : Fen_graphique.Graphics.DrawPicture (Graph, 0, 0)
Fen_graphique is the desktopcanvas and Graph is the scaledpicture.
In the last Xojo version how could I get this working again ?
Which error do you get and what is the Xojo version. I suggest you tale a screen shot of the IDE showing the line of code that do not compile as well as the error message.
I assume you say that instead of using a drawpicture instruction everytime I need to redraw the desktopcanvas in the code I should call the refresh event ?
But into the paint event I have also an instruction “Fen_graphique.Graphics.DrawPicture (Graph, 0, 0)” which is in error when I try to run the app.
I have a desktopcanvas : Fen_graphique into my main windows.
I have then a scaledpicture (which is modified picture object) : Graph. Inside Graph I do all my drawings (lines, circles etc…).
How can I display Graph into Fen_Graphique ?
Then for exemple during a zoom I want to draw a rectangle which follow the mouse. So inside the mouse move event how can I refresh the display of Graph into Fen_Graphique ?