-
Oct 29th, 2007, 06:41 AM
#1
Thread Starter
Fanatic Member
.net 2005 - win form - manifest - win xp style
Hi,
I am using .net 2.0 windows forms under windows xp pro.
Created a file called: MA.exe.manifest
The solution is MA.sln
This manifest file is in the same path as MA.sln on the C drive where I do the development.
For a particular button property in the form I have set the flatstyle property to system rather than standard.
How can I enable the Windows XP styles? I.e. a button control to appear as the windows xp style rather than the present standard.
This is the content of the manifest file:
version="1.0.0.0"
processorArchitecture="X86"
name="WindowsXP"
type="win32"
/>
Your application description here.
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
-
Oct 29th, 2007, 07:48 AM
#2
Frenzied Member
Re: .net 2005 - win form - manifest - win xp style
You shouldnt have to use a manifest file to get windows xp style buttons. I think that was in VB6, unless im misunderstanding you.
-
Oct 29th, 2007, 08:02 AM
#3
Thread Starter
Fanatic Member
Re: .net 2005 - win form - manifest - win xp style
Well, all I can say is that the default code does not work.
By default I mean:
c# style:
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Thanks
-
Oct 29th, 2007, 08:07 AM
#4
Frenzied Member
Re: .net 2005 - win form - manifest - win xp style
No im saying that you shouldnt have to use any code at all to get win xp buttons, they should be like that as soon as you place them on the form.
-
Oct 29th, 2007, 08:39 AM
#5
Thread Starter
Fanatic Member
Re: .net 2005 - win form - manifest - win xp style
well, they do not appear as win xp style.
-
Oct 29th, 2007, 09:17 AM
#6
Re: .net 2005 - win form - manifest - win xp style
I believe up until VS 2005 (i.e. VB6 and VS.NET 2002/2003) you needed the manifest to get XP visual styles, however in VS 2005, no manifest or extra code is needed. From the IDE, Project menu, then Properties for your project, on the Application tab, in the area labelled "Windows application framework properties", there should be a checkbox for "Enable XP visual styles". Checking this should cause the controls on your forms to have the XP style at run-time (as well as design-time).
"It's cold gin time again ..."
Check out my website here.
-
Oct 30th, 2007, 03:02 AM
#7
Re: .net 2005 - win form - manifest - win xp style
BruceG you are right on the 2005 settings but in 2003 you had to make sure the FlatStyle of the button was set to System and then before any form was loaded or created you needed to call the Application.EnableVisualStyles call and then a Application.DoEvents to refresh it. No manifest file needed.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Oct 30th, 2007, 04:27 AM
#8
Re: .net 2005 - win form - manifest - win xp style
Are you using Visual Studio or are you just using the .NET Framework commandline tools to create your application?
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
|