Building a Real Studio 5.5 project

I have a Real Studio 5.5 application that I would like to compile for 64 compatibility with the upcoming Catalina.
Xojo opens the file fine but when I try to build I get 30 errors.
The first error is
Type “Main.Main” has no member names “graphics”
me.graphics.ForeColor=RGB(0,0,255)

The second error is
Type “int32” has no member named “ForeColor”
me.graphics.ForeColor=RGB(0,0,255)

These two errors apply to one line of code.

The remaining errors seem to be along the same lines as these.

Can anyone advice?

Thanks.

I’m guessing that’s in a canvas. If so, you can no longer access the .Graphics property directly. Use the “g as graphics” parameter in the Paint event instead of “me.Graphics”. Ie.,

g.ForeColor = RGB(0,0,255)

Similarly in the paint events of a listbox.

The whole philopsphy behind updating a canvas (or graphics property of a control like listbox) has change drastically since RB5.5

most things now need to (and should be) done within the appropriate PAINT related events

Moving drawing to the Paint event g property will require refactoring.

The quickest way to adapt your code would be to use the graphic property of a picture in the backdrop of controls and windows where you used graphics.

Create a picture the same size as your window or canvas in the Open event, and assign it to backdrop.

You would then simply do

me.backdrop.graphics.ForeColor=RGB(0,0,255)

This might help:

https://documentation.xojo.com/topics/graphics/updating_code_that_used_the_graphics_property.html

Thanks for all the replies.
I looked at the doc referenced by Paul Lefebvre concerning code that used the graphics property.
All of the drawing in my old Real Studio app currently is executed in the MouseDown event handler.
The doc suggests that I use the MouseDown event to simply record the X and Y coordinates of the mouse click and then invoke the Paint event handler using Canvas1.Invalidate(False). The doc then recommends that I put all the drawing in the Paint event handler using calls like g.FillRect(LastClickX, LastClickY, 5, 5).
Are there any further declarations or definitions that need to made to make this work?
Thanks again for the responses to my questions.

That sounds like you pretty much have it.