Results 1 to 8 of 8

Thread: .net 2005 - win form - manifest - win xp style

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    .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="*"

    />

  2. #2
    Frenzied Member Motoxpro's Avatar
    Join Date
    Sep 2001
    Location
    Spiro, OK
    Posts
    1,211

    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.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    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

  4. #4
    Frenzied Member Motoxpro's Avatar
    Join Date
    Sep 2001
    Location
    Spiro, OK
    Posts
    1,211

    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.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Re: .net 2005 - win form - manifest - win xp style

    well, they do not appear as win xp style.

  6. #6
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657

    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.

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    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
  •  



Click Here to Expand Forum to Full Width