Canvas works in Mac not Windows

I have a simple report. It draws on a Canvas.

Works on Mac. Nothing but white on Windows.

Is there any difference that I should be accounting for?

Much thanks.

What’s the code?

Rather long and complicated.

I’ll see if I can make a simple example that shows the problem, but perhaps not today.

There’s nothing specific in terms of things to account for that would explain the results you’re seeing, so it’s in the code somewhere.

Tim,

Since it works find on Mac, I was concerned that there was something different about the order of which things happen.

Apparently not?

Could be, but it would be your code that’s operating in an order you’re not expecting; not a general “do {some thing} on Windows.”

Paring it down to a reproducible example might also help you find what the issue is.

If you drawing code is all within the scope of the Canvas PAINT event, there is zero difference between macOS and Windows in that regard. If you are attempting to circumvent the proper order of things, then all bets are off.

Canvas drawing must be in the Paint event, or in an external method that is called from the Paint Event and passes the graphic object instantiated by the Paint Event. You cannot reference the canvas graphics object indirectly (ie. Canvas1.Graphics is not supported)

Weird thought. :wink:
Can it be that the report text in Windows has the same color as the background?

Back to basics.

Why don’t you create a brand new project (from nothing) that simply draw stuff into a Canvas ?

No large code copy/paste, but instead add small parts of code that will enable you to KNOW everything works as usual until you’ll be back to your main (non working) project ?

Create this project with the IDE version you are using with that project.

Just a thought. On windows there was a change when using pictures that needed a third parameter, in this case of 32.

dim p as new picture(200, 200, 32)

This is just a guess.

[quote=429704:@Eugene Dakin]Just a thought. On windows there was a change when using pictures that needed a third parameter, in this case of 32.

dim p as new picture(200, 200, 32)

This is just a guess.[/quote]
It’s the other way around. You should no longer need the third parameter.

Do you have any controls on the window other than the canvas?
Do you alter any of those controls from the paint of the canvas?
Do you alter properties of the canvas from anywhere else?
If those controls overlap the canvas it could cause these issues.

[quote=429724:@JulianS]Do you have any controls on the window other than the canvas?
Do you alter any of those controls from the paint of the canvas?
Do you alter properties of the canvas from anywhere else?
If those controls overlap the canvas it could cause these issues.[/quote]

Or if the controls on the canvas are not properly on it. Make sure that, under WIndows in the IDE, each control on the canvas, when highlighted causes the red outline around the canvas.