in the appearanceChanged event of app I have this code:
for i as Integer = 0 to WindowCount-1 if Window(i) isa versionsWin then if IsDarkMode then versionsWin.RoundRectangle1.FillColor = kClrDarkMode else versionsWin.RoundRectangle1.FillColor = kClrWhite end if exit end if next
Switching between light and dark mode works OK when the window is not a floating window.
But if I make the window a floating window, RoundRectangle1 does not react; it remains the same as in light mode.
So I put the code into the paint event of the floating window, and now RoundRectangle1 changes its color all right:
if IsDarkMode then RoundRectangle1.FillColor = backClrDM else RoundRectangle1.FillColor = recBackClr end if
Hence my question: is it safe to move into the paint event of all windows their own code that at present resides in appearanceChanged, even if a window would not necessarily need a paint event?
Thank you for any suggestion.