Weird canvas behavior

I have a weird behaviour in two windows:
I have canvas performing as buttons. When window 1 opens, the canvas shows as in pic 1 (canvas is where the pencil is), everything is normal and it works as a button when click upon.
If I move to window 2 and come back, the canvas is almost invisible (pic 2) until I click on it.
I tried to put a refresh in the opening event of the canvas itself and I tries to put it into the opening event of the window. Neither worked.
There is nothing covering it and does not have any special coding.
There are other canvas doubling as buttons in the window and none of them seems to have this problem.
I even tried to move it, deleting it and put it back again.
I really am out of ideas.

Any help?

Thank you


Ma come disegni nel canvas? setti la picture tramite backdrop? usi l’evento paint? Comunque sembra strana l’immagine2… il canvas appare cancellato con una forma “a cerchio”

Sono tutti disegnati con evento paint. Funzionano tutti tranne questo

They’re all drawn by paint event. They all work but this one

potresti provare a settare la picture al rientro nella finestra 1, tramite la proprietà Backdrop…
non il massimo, ma magari si rivela un workaround che funziona…

Grazie, ho risolto. Unoa stupida linea di codice che non doveva essere lì. Grazie comunque

Thank yopu, I solved. A stupid code line not supposed to be there. Thanks anyway