0

Let's get straight to the point, a time'm implementing a Message Box in Metro Style with Windows Forms and C # implementation was cool, but I'm having problems with semi transparent background on windows XP, use the method:

this.BackColor = Color.FromArgb (0x46, 0x69, 0x69, 0x69);

This model worked perfectly on windows 7 and 8 on XP but not also renders simply ignores the parameter Alpha. and beyond it depending on the system model theme he does not respond to Alpha too.

Even after searching I did not find something that really works perfectly in this Annex I developed a model based on other examples, to work on Windows XP, 7 and 8, the background is semi transparent independent of themes but does not render the controls inside the form of message simply ignores all content.

Hope you can give me a help.

Thank you in advance.

Download Examples

  • Please take a look through [how to ask](http://stackoverflow.com/help/how-to-ask) and [formatting help](http://stackoverflow.com/help/formatting). I tried editing your post, but I can't understand your true intention. – gunr2171 Dec 15 '13 at 21:14
  • Ok, What I want and create a message box in Windows 8 Metro style but the semi transparent background is not compatible with versions of Windows XP, Windows 7 and Windows 8, the transparency is simply ignored, with the example model could reach a standard that maintains the appearance but it ignores the controls within the form. See the examples in https://skydrive.live.com/?cid=2f562362cfabc8d2&id=2F562362CFABC8D2!25327&ithint=folder,&authkey=!ACU5a0_stdQSFE0 – Paulo Rodrigo Martins Dec 15 '13 at 21:23

1 Answers1

0

Only Top-Level windows (Forms) support alpha transparence in Winforms, but not controls. If you want to have semi-transparent controls in Winforms you'll have to implement that feature by yourself.

See this post as an example: Winforms: Making a control transparent

Edit: If you want a transparent / semi-transparent MessageBox, you have to create it yourself. Simply inherit from Form (which supports transparency) and create the look and feel that you want to have. Then you can simply set the opacity of 'your' MessageBox:

myMessageBox.Opacity = .75;

If you want more control over the appearance of your controls you should consider using WPF. Here is a WPF-controll that seems to fit your needs:

All-Purpose Message Box in WPF

Community
  • 1
  • 1
user1567896
  • 2,398
  • 2
  • 26
  • 43