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.

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?
 
C

Chris Dunaway

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"))

I'm not clear on what you are attempting to do. Are trying to get the XP
look and feel on your controls? Or are you trying to create an irregularly
shaped form using a region?

For the first,

Add

Application.EnableVisualStyles
Application.DoEvents '<------ Important to work around a bug

Make sure all of your controls have their FlatStyle property set to System.



For the region, create an instance of the GraphicsPath class. Use its
various methods to create your shape. Then create a region object from the
GraphicsPath and assign that region to the form or control:

Dim gp As New GraphicsPath

gp.AddEllipse(Me.ClientRectangle)

Dim rgn As New Region(gp)

Me.Region = rgn


HTH


--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
M

Morten Wennevik

Hi Gary,

I believe you need to install the XP Theme on Windows 2003 before the XP
style is visible.
 

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

Similar Threads

XP visual style 3
Entry in DataGrid 2
XP Style Look in windows app 6
Image in Button with XP style look 1
Visual Styles 9
Visual Styles and Button Images 2
cmov instructions 1
OnBeginShutdown problems 3

Top