Skip to content

Button disappears when using LogMeIn to log into the computer #1

@tzachshabtay

Description

@tzachshabtay

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions