Button disappears when using LogMeIn to log into the computer
It seems that if the form was opened from a Win7 computer, and then another user takes the computer using LogMeIn from a WinXP computer, the active button disappears. If I close and re-open the form the button re-appears.
The reason for that, I think, is due the following code in ActiveButton.Initialize:
if (Win32.DwmIsCompositionEnabled || Application.RenderWithVisualStyles) { base.BackColor = Color.Transparent; } else { base.BackColor = Color.FromKnownColor(KnownColor.Control); }
The check of Application.RenderWithVisualStyles will not give correct results if the OS style was changed during runtime (according to this blog entry: http://www.yortondotnet.com/2006/08/applicationrenderwithvisualstyles.html).
The solution for us was to always give the button BackColor = Color.FromKnownColor(KnownColor.Control);
Hi, thanks for letting me know. The transparent background is needed to support non-aero visual styles from what I can remember. When I get a chance I'll test the behaviour with the fix you suggest.