PC Review


Reply
Thread Tools Rate Thread

C# with XP look

 
 
Wndr
Guest
Posts: n/a
 
      9th Oct 2008
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.


 
Reply With Quote
 
 
 
 
Duggi
Guest
Posts: n/a
 
      9th Oct 2008
On Oct 9, 10:52*am, "Wndr" <some...@yahoo.com> wrote:
> 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
 
Reply With Quote
 
Hillbilly
Guest
Posts: n/a
 
      9th Oct 2008
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).

"Wndr" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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.
>


 
Reply With Quote
 
xcal
Guest
Posts: n/a
 
      9th Oct 2008
but, can XP use WPF?

"Hillbilly" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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).
>
> "Wndr" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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.
> >

>



 
Reply With Quote
 
Wndr
Guest
Posts: n/a
 
      10th Oct 2008
Where could I get these Windows Presentation Foundation classes?

"Peter Duniho" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> On Thu, 09 Oct 2008 14:58:16 -0700, xcal <(E-Mail Removed)> wrote:
>
>> but, can XP use WPF?

>
> Yes, of course.



 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      10th Oct 2008
Wndr <(E-Mail Removed)> wrote:
> Where could I get these Windows Presentation Foundation classes?


They're part of .NET 3.0.

--
Jon Skeet - <(E-Mail Removed)>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
 
Reply With Quote
 
Wndr
Guest
Posts: n/a
 
      10th Oct 2008
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]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Wndr <(E-Mail Removed)> wrote:
>> Where could I get these Windows Presentation Foundation classes?

>
> They're part of .NET 3.0.
>
> --
> Jon Skeet - <(E-Mail Removed)>
> Web site: http://www.pobox.com/~skeet
> Blog: http://www.msmvps.com/jon.skeet
> C# in Depth: http://csharpindepth.com



 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      11th Oct 2008
Wndr <(E-Mail Removed)> wrote:
> 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 - <(E-Mail Removed)>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
 
Reply With Quote
 
Todd Carnes
Guest
Posts: n/a
 
      11th Oct 2008
"Hillbilly" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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

 
Reply With Quote
 
harborsparrow
Guest
Posts: n/a
 
      12th Oct 2008
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();
}
}



On Oct 9, 1:52*pm, "Wndr" <some...@yahoo.com> wrote:
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:59 PM.