-
January 2nd, 2010, 10:33 PM
#1
MessageBox buttons
Hey, I've added Application.EnableVisualStyles(); to my form code, but when I do MessageBox.Show("test"); the buttons still look pre-XPish.
Does anyone know what the problem is?
Thanks for the help.
-
January 3rd, 2010, 09:06 AM
#2
Re: MessageBox buttons
Originally Posted by jaikob
Hey, I've added Application.EnableVisualStyles(); to my form code, but when I do MessageBox.Show("test"); the buttons still look pre-XPish.
Does anyone know what the problem is?
Thanks for the help.
So basically what your trying to do is changed theme in which the entire program's displayed right?
-
January 3rd, 2010, 11:50 AM
#3
-
January 3rd, 2010, 12:21 PM
#4
Re: MessageBox buttons
Should the theme be changed through Control Panel??
-
January 3rd, 2010, 02:53 PM
#5
Re: MessageBox buttons
No, The application I am making in C# looks like a windows 2000 application, without button gradients. I add the above code, but my messageboxes still show a pre-XP themed button. It's the way the app looks.
-
January 3rd, 2010, 06:55 PM
#6
Re: MessageBox buttons
Why do you want to display a MessageBox without any buttons?
-
January 3rd, 2010, 06:55 PM
#7
Re: MessageBox buttons
Originally Posted by jaikob
Hey, I've added Application.EnableVisualStyles(); to my form code, but when I do MessageBox.Show("test"); the buttons still look pre-XPish.
Does anyone know what the problem is?
Thanks for the help.
IIRC, the MessageBox functionality is just wrappers around the OS Win32 message box. So the MessageBox will just use the visual style set by the OS settings.
If the styles in your app are different than those of the OS, you'll need to create your own messagebox form in order to get your app specific styles.
-
September 17th, 2010, 12:26 PM
#8
Re: MessageBox buttons
Originally Posted by jaikob
Hey, I've added Application.EnableVisualStyles(); to my form code, but when I do MessageBox.Show("test"); the buttons still look pre-XPish.
Does anyone know what the problem is?
Here is another description of the issue:
http://www.nbdtech.com/Blog/archive/...d-Message.aspx
Unfortunately, the workaround suggested doesn't seem to work for me in VSE 2010. Any constructive suggestions are appreciated.
-t
-
September 27th, 2010, 05:02 PM
#9
Re: MessageBox buttons
Solved. It turned out the manifest file created in Visual Studio 2010 works on Vista and 7 but doesn't work on XP. On XP just use the manifest file at http://www.nbdtech.com/Blog/archive/...d-Message.aspx
Last edited by tr00don; September 27th, 2010 at 05:22 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|