tranparency problem with different systems

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to make the background of a MDI apllication transparent using the transparentKey property of System.Windows.Forms.Form. After making trasparent, my application is giving painting problem while moving the child window inside the MDI frame. It is not able to paint the background window properly.

This problem is hapenning for very few systems.

Following is the code (executes on menu item click)

// Toggle transparent background menu selection.
private void ToggleTransparentBkgnd_Click(object sender, System.EventArgs e)
{
if (this.toggleTransparentBkgnd.Checked == true)
{
this.toggleTransparentBkgnd.Checked = false;
this.TransparencyKey = transparencyKey;
}
else
{
this.toggleTransparentBkgnd.Checked = true;
transparencyKey = this.TransparencyKey;
this.TransparencyKey = Color.FromKnownColor(KnownColor.AppWorkspace);
}
}

regards,

Ajit
 
Hey Ajit,

Just a shot in the dark, but non-rectangular forms aren't supported on
32-bit color settings. I know there is some relationship between how .NET
handles transparent forms and non-rectangular forms. Is it possible that
these select machines are set to 32- rather than 24-bit color display?

HTH,

John

Ajit said:
Hi,

I am trying to make the background of a MDI apllication transparent using
the transparentKey property of System.Windows.Forms.Form. After making
trasparent, my application is giving painting problem while moving the child
window inside the MDI frame. It is not able to paint the background window
properly.
 
Back
Top