XP visual style

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gary Miller

    #1

    XP visual style

    http://msdn.microsoft.com/library/de...lStudioNET.asp


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

    with NO luck.

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

    Also.
    1) added Application.Ena bleVisualStyles (); before .run
    2) private void RecursivelyForm atForWinXP(Cont rol control)
    3) if(Environment. OSVersion.Versi on.Major > 4
    & Environment.OSV ersion.Version. Minor > 0
    & System.IO.File. Exists(Applicat ion.ExecutableP ath + ".manifest" ))

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

    Any ideas?

  • Gary Miller

    #2
    RE: XP visual style

    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?

    ------------------------------------------------------------------------------------------------
    "Gary Miller" wrote:
    [color=blue]
    > http://msdn.microsoft.com/library/de...lStudioNET.asp
    >
    >
    > I've tried everything in the article
    > http://msdn.microsoft.com/library/de...lStudioNET.asp
    >
    > with NO luck.
    >
    > I've tried this on 2003 server and 2003 XP.
    >
    > Also.
    > 1) added Application.Ena bleVisualStyles (); before .run
    > 2) private void RecursivelyForm atForWinXP(Cont rol control)
    > 3) if(Environment. OSVersion.Versi on.Major > 4
    > & Environment.OSV ersion.Version. Minor > 0
    > & System.IO.File. Exists(Applicat ion.ExecutableP ath + ".manifest" ))
    >
    > All seems to execute during debug, but NO visual changes.
    >
    > Any ideas?
    >[/color]

    Comment

    • Chris Dunaway

      #3
      Re: XP visual style

      On Thu, 21 Oct 2004 06:22:23 -0700, Gary Miller wrote:
      [color=blue]
      > 1) added Application.Ena bleVisualStyles (); before .run
      > 2) private void RecursivelyForm atForWinXP(Cont rol control)
      > 3) if(Environment. OSVersion.Versi on.Major > 4
      > & Environment.OSV ersion.Version. Minor > 0
      > & System.IO.File. Exists(Applicat ion.ExecutableP ath + ".manifest" ))[/color]

      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.Ena bleVisualStyles
      Application.DoE vents '<------ 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(M e.ClientRectang le)

      Dim rgn As New Region(gp)

      Me.Region = rgn


      HTH


      --
      Chris

      dunawayc[AT]sbcglobal_lunch meat_[DOT]net

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

      Comment

      • Morten Wennevik

        #4
        Re: XP visual style

        Hi Gary,

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

        --
        Happy Coding!
        Morten Wennevik [C# MVP]

        Comment

        • Sriram Krishnan

          #5
          Re: XP visual style

          Could you post your exe somewhere so that we can download it?

          --
          Sriram Krishnan




          "Gary Miller" <GaryMiller@dis cussions.micros oft.com> wrote in message
          news:45D1F00E-EC1E-4FCA-AD3A-2091861181D2@mi crosoft.com...[color=blue]
          > http://msdn.microsoft.com/library/de...lStudioNET.asp
          >
          >
          > I've tried everything in the article
          > http://msdn.microsoft.com/library/de...lStudioNET.asp
          >
          > with NO luck.
          >
          > I've tried this on 2003 server and 2003 XP.
          >
          > Also.
          > 1) added Application.Ena bleVisualStyles (); before .run
          > 2) private void RecursivelyForm atForWinXP(Cont rol control)
          > 3) if(Environment. OSVersion.Versi on.Major > 4
          > & Environment.OSV ersion.Version. Minor > 0
          > & System.IO.File. Exists(Applicat ion.ExecutableP ath + ".manifest" ))
          >
          > All seems to execute during debug, but NO visual changes.
          >
          > Any ideas?
          >[/color]


          Comment

          Working...