XP visual style

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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?
 
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.
 
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?
 
Back
Top