C# with XP look

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

    C# with XP look

    Hi guys.
    I am newbie in C#.
    I have a project written in MS VisualStudio 2008, C#. So when I execute the
    project (Windows Forms Application) on the same machine when MSVS2008
    installed the form style I get is XP, but when I run same exe on machine
    that doesn't have this installed I get old look style.
    Does any one have an idea on if it's possible to be able to have XP look on
    any machine, regardless if MSVS2008 installed or not, and how.
    Thanks in advance.


  • Duggi

    #2
    Re: C# with XP look

    On Oct 9, 10:52 am, "Wndr" <some...@yahoo. comwrote:
    Hi guys.
    I am newbie in C#.
    I have a project written in MS VisualStudio 2008, C#. So when I execute the
    project (Windows Forms Application) on the same machine when MSVS2008
    installed the form style I get is XP, but when I run same exe on machine
    that doesn't have this installed I get old look style.
    Does any one have an idea on if it's possible to be able to have XP look on
    any machine, regardless if MSVS2008 installed or not, and how.
    Thanks in advance.
    investigate on EnableVisualSty les() ...

    However if you want it to be look like XP style in other OS / older OS
    than XP, I think it is hard.. you may need to include all the imanges
    in the resources...

    -Cnu

    -Cnu

    Comment

    • Hillbilly

      #3
      Re: C# with XP look

      Yes, EnableVisualSty les() is the classic (but old) way of managing a Windows
      UI and should be learned first but the big picture in this context of the UI
      is now all about using the classes in the Windows Presentation Foundation
      (WPF).

      "Wndr" <someone@yahoo. comwrote in message
      news:%23wsnTfjK JHA.2208@TK2MSF TNGP02.phx.gbl. ..
      Hi guys.
      I am newbie in C#.
      I have a project written in MS VisualStudio 2008, C#. So when I execute
      the project (Windows Forms Application) on the same machine when MSVS2008
      installed the form style I get is XP, but when I run same exe on machine
      that doesn't have this installed I get old look style.
      Does any one have an idea on if it's possible to be able to have XP look
      on any machine, regardless if MSVS2008 installed or not, and how.
      Thanks in advance.
      >

      Comment

      • xcal

        #4
        Re: C# with XP look

        but, can XP use WPF?

        "Hillbilly" <somebody@somew here.comwrote in message
        news:eOTylGkKJH A.740@TK2MSFTNG P03.phx.gbl...
        Yes, EnableVisualSty les() is the classic (but old) way of managing a
        Windows
        UI and should be learned first but the big picture in this context of the
        UI
        is now all about using the classes in the Windows Presentation Foundation
        (WPF).
        >
        "Wndr" <someone@yahoo. comwrote in message
        news:%23wsnTfjK JHA.2208@TK2MSF TNGP02.phx.gbl. ..
        Hi guys.
        I am newbie in C#.
        I have a project written in MS VisualStudio 2008, C#. So when I execute
        the project (Windows Forms Application) on the same machine when
        MSVS2008
        installed the form style I get is XP, but when I run same exe on machine
        that doesn't have this installed I get old look style.
        Does any one have an idea on if it's possible to be able to have XP look
        on any machine, regardless if MSVS2008 installed or not, and how.
        Thanks in advance.
        >

        Comment

        • Peter Duniho

          #5
          Re: C# with XP look

          On Thu, 09 Oct 2008 14:58:16 -0700, xcal <a@a.comwrote :
          but, can XP use WPF?
          Yes, of course.

          Comment

          • Wndr

            #6
            Re: C# with XP look

            Where could I get these Windows Presentation Foundation classes?

            "Peter Duniho" <NpOeStPeAdM@nn owslpianmk.comw rote in message
            news:op.uisgbip 68jd0ej@petes-computer.local. ..
            On Thu, 09 Oct 2008 14:58:16 -0700, xcal <a@a.comwrote :
            >
            >but, can XP use WPF?
            >
            Yes, of course.

            Comment

            • Jon Skeet [C# MVP]

              #7
              Re: C# with XP look

              Wndr <someone@yahoo. comwrote:
              Where could I get these Windows Presentation Foundation classes?
              They're part of .NET 3.0.

              --
              Jon Skeet - <skeet@pobox.co m>
              Web site: http://www.pobox.com/~skeet
              Blog: http://www.msmvps.com/jon.skeet
              C# in Depth: http://csharpindepth.com

              Comment

              • Wndr

                #8
                Re: C# with XP look

                Hi. I installed .Net Framework 3.0 and 3.5 and still don't get the gui I get
                on another machine.
                Both machines XP SP2, both have .Net 3.0 and 3.5, the only difference is one
                has MSVStudio 2008 and another MSVS2005, so is there any way when I compile
                my project in VS2008 with all this nice gui to see the same look on machine
                that has VS 2005?
                Thanks
                "Jon Skeet [C# MVP]" <skeet@pobox.co mwrote in message
                news:MPG.235989 d7fc7b08d0fc2@m snews.microsoft .com...
                Wndr <someone@yahoo. comwrote:
                >Where could I get these Windows Presentation Foundation classes?
                >
                They're part of .NET 3.0.
                >
                --
                Jon Skeet - <skeet@pobox.co m>
                Web site: http://www.pobox.com/~skeet
                Blog: http://www.msmvps.com/jon.skeet
                C# in Depth: http://csharpindepth.com

                Comment

                • Peter Duniho

                  #9
                  Re: C# with XP look

                  On Fri, 10 Oct 2008 13:51:46 -0700, Wndr <someone@yahoo. comwrote:
                  Hi. I installed .Net Framework 3.0 and 3.5 and still don't get the gui I
                  get
                  on another machine.
                  WPF is an API in .NET. Either you're using it, or you're not. Upgrading
                  to a new version of .NET doesn't automatically cause your previous non-WPF
                  applications to all of the suddenly start using WPF.

                  Comment

                  • Jon Skeet [C# MVP]

                    #10
                    Re: C# with XP look

                    Wndr <someone@yahoo. comwrote:
                    Hi. I installed .Net Framework 3.0 and 3.5 and still don't get the gui I get
                    on another machine.
                    What exactly do you mean? WPF is an API you program against -
                    installing it won't turn change any existing programs.
                    Both machines XP SP2, both have .Net 3.0 and 3.5, the only difference is one
                    has MSVStudio 2008 and another MSVS2005, so is there any way when I compile
                    my project in VS2008 with all this nice gui to see the same look on machine
                    that has VS 2005?
                    Could you put screenshots of the two views onto a website somewhere? Is
                    it possible that you've just got a different theme on one of your
                    boxes?

                    --
                    Jon Skeet - <skeet@pobox.co m>
                    Web site: http://www.pobox.com/~skeet
                    Blog: http://www.msmvps.com/jon.skeet
                    C# in Depth: http://csharpindepth.com

                    Comment

                    • Todd Carnes

                      #11
                      Re: C# with XP look

                      "Hillbilly" <somebody@somew here.comwrote in message
                      news:eOTylGkKJH A.740@TK2MSFTNG P03.phx.gbl...
                      Yes, EnableVisualSty les() is the classic (but old) way of managing a
                      Windows UI and should be learned first but the big picture in this context
                      of the UI is now all about using the classes in the Windows Presentation
                      Foundation (WPF).

                      Just because WPF is available, doesn't automatically mean it's the best
                      choice all the time. Actually, I haven't seen where WPF is all that great
                      myself, but that's just my own personal opinion. I have no burning desire to
                      learn yet another way to create a window, when the way I already know, is
                      easy and gets the job done just fine.

                      Todd

                      Comment

                      • harborsparrow

                        #12
                        Re: C# with XP look

                        Here's how to get it if the OS can do it:

                        // enable XP theming ("visual styles") if newer OS and
                        feature available
                        if ((Environment.O SVersion.Versio n.Major >= 5) &&
                        (Environment.OS Version.Version .Minor 0))
                        {
                        if (OSFeature.Feat ure.IsPresent(O SFeature.Themes ))
                        {
                        Application.Ena bleVisualStyles ();
                        }
                        }



                        On Oct 9, 1:52 pm, "Wndr" <some...@yahoo. comwrote:
                        Hi guys.
                        I am newbie in C#.
                        I have a project written in MS VisualStudio 2008, C#. So when I execute the
                        project (Windows Forms Application) on the same machine when MSVS2008
                        installed the form style I get is XP, but when I run same exe on machine
                        that doesn't have this installed I get old look style.
                        Does any one have an idea on if it's possible to be able to have XP look on
                        any machine, regardless if MSVS2008 installed or not, and how.
                        Thanks in advance.

                        Comment

                        • Jon Skeet [C# MVP]

                          #13
                          Re: C# with XP look

                          Wndr <someone@yahoo. comwrote:
                          Thanks so much for replay.
                          Just trying to understand why same application looks different on two
                          machine these have XP Sp2.
                          The XPStyleButton bmp is from the machine where MSVisualStudio2 008
                          installed. Another bmp I will send in another message, the Outlook complains
                          that the message is too large.
                          Okay - if you run any other applications (e.g. Notepad) on the two
                          boxes, do they both look the same? My guess is that it's just the
                          display settings for the machines.

                          --
                          Jon Skeet - <skeet@pobox.co m>
                          Web site: http://www.pobox.com/~skeet
                          Blog: http://www.msmvps.com/jon.skeet
                          C# in Depth: http://csharpindepth.com

                          Comment

                          • Wndr

                            #14
                            Re: C# with XP look

                            No they look different.
                            I think you are right, but what should I change on machine?
                            Thank you.

                            "Jon Skeet [C# MVP]" <skeet@pobox.co mwrote in message
                            news:MPG.235efd b19e69c4c2fc9@m snews.microsoft .com...
                            Wndr <someone@yahoo. comwrote:
                            >Thanks so much for replay.
                            >Just trying to understand why same application looks different on two
                            >machine these have XP Sp2.
                            >The XPStyleButton bmp is from the machine where MSVisualStudio2 008
                            >installed. Another bmp I will send in another message, the Outlook
                            >complains
                            >that the message is too large.
                            >
                            Okay - if you run any other applications (e.g. Notepad) on the two
                            boxes, do they both look the same? My guess is that it's just the
                            display settings for the machines.
                            >
                            --
                            Jon Skeet - <skeet@pobox.co m>
                            Web site: http://www.pobox.com/~skeet
                            Blog: http://www.msmvps.com/jon.skeet
                            C# in Depth: http://csharpindepth.com

                            Comment

                            • Jon Skeet [C# MVP]

                              #15
                              Re: C# with XP look

                              Wndr <someone@yahoo. comwrote:
                              No they look different.
                              I think you are right, but what should I change on machine?
                              Thank you.
                              I don't know - I don't have XP any more. But it'll be somewhere in
                              display properties.

                              --
                              Jon Skeet - <skeet@pobox.co m>
                              Web site: http://www.pobox.com/~skeet
                              Blog: http://www.msmvps.com/jon.skeet
                              C# in Depth: http://csharpindepth.com

                              Comment

                              Working...