XP visual style

G

Guest

http://msdn.microsoft.com/library/d...apedWindowsFormsControlsInVisualStudioNET.asp


I've tried everything in the article
http://msdn.microsoft.com/library/d...apedWindowsFormsControlsInVisualStudioNET.asp

with NO luck.

I've tried this on 2003 server and 2003 XP.

Also.
1) added Application.EnableVisualStyles(); before .run
2) private void RecursivelyFormatForWinXP(Control control)
3) if(Environment.OSVersion.Version.Major > 4
& Environment.OSVersion.Version.Minor > 0
& System.IO.File.Exists(Application.ExecutablePath + ".manifest"))

All seems to execute during debug, but NO visual changes.

One thing I noticed. When I open the .EXE file and add the manifest
resource, it does not stay added. Can't recompile while I have it opened in
VS, when I recompile, it is not there any more.

Any ideas?
 
G

Guest

I re-checked the article and found a mistake in my execution. I added the
manifest resource to the wrong .EXE.

I did the import to the .OBJ\DEBUG .EXE and now it is permanent in the
compiled .EXE.

But, still NO XP style on any of my forms.

Once, again. Any ideas?
 
G

Guest

Make sure the FlatStyle property of all controls you want to gain visual
styles is set to "System"...
As long as you do that, you just need to do
Application.EnableVisualStyles
Application.DoEvents

as the very first two lines of your application
And nothing more.
Don't know where you got
2) private void RecursivelyFormatForWinXP(Control control)
3) if(Environment.OSVersion.Version.Major > 4
& Environment.OSVersion.Version.Minor > 0
& System.IO.File.Exists(Application.ExecutablePath + ".manifest"))

from.
You shouldn't need it, neither should you need to modify the .EXE file
manually. Just have FlatStyle = System. It's not the default.
 
B

Bonj

have you tried doing what I said?


Gary Miller said:
I re-checked the article and found a mistake in my execution. I added the
manifest resource to the wrong .EXE.

I did the import to the .OBJ\DEBUG .EXE and now it is permanent in the
compiled .EXE.

But, still NO XP style on any of my forms.

Once, again. Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top