C# with XP look

  • Thread starter Thread starter Wndr
  • Start date Start date
W

Wndr

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.
 
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 EnableVisualStyles() ...

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
 
Yes, EnableVisualStyles() 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).
 
but, can XP use WPF?

Hillbilly said:
Yes, EnableVisualStyles() 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).
 
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
 
Wndr said:
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?
 
Hillbilly said:
Yes, EnableVisualStyles() 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
 
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.OSVersion.Version.Major >= 5) &&
(Environment.OSVersion.Version.Minor > 0))
{
if (OSFeature.Feature.IsPresent(OSFeature.Themes))
{
Application.EnableVisualStyles();
}
}
 
Wndr said:
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 MSVisualStudio2008
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.
 
Wndr said:
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.
 
Back
Top