ActiveButtons.Net icon indicating copy to clipboard operation
ActiveButtons.Net copied to clipboard

Button disappears when using LogMeIn to log into the computer

Open tzachshabtay opened this issue 13 years ago • 1 comments

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);

tzachshabtay avatar Jun 05 '12 11:06 tzachshabtay

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.

TheCodeKing avatar Jun 12 '12 15:06 TheCodeKing