473,395 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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.
Oct 9 '08 #1
14 1242
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 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
Oct 9 '08 #2
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" <so*****@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP02.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.
Oct 9 '08 #3
but, can XP use WPF?

"Hillbilly" <so******@somewhere.comwrote in message
news:eO*************@TK2MSFTNGP03.phx.gbl...
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" <so*****@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP02.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.

Oct 9 '08 #4
On Thu, 09 Oct 2008 14:58:16 -0700, xcal <a@a.comwrote:
but, can XP use WPF?
Yes, of course.
Oct 10 '08 #5
Where could I get these Windows Presentation Foundation classes?

"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Thu, 09 Oct 2008 14:58:16 -0700, xcal <a@a.comwrote:
>but, can XP use WPF?

Yes, of course.

Oct 10 '08 #6
Wndr <so*****@yahoo.comwrote:
Where could I get these Windows Presentation Foundation classes?
They're part of .NET 3.0.

--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Oct 10 '08 #7
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]" <sk***@pobox.comwrote in message
news:MP*********************@msnews.microsoft.com. ..
Wndr <so*****@yahoo.comwrote:
>Where could I get these Windows Presentation Foundation classes?

They're part of .NET 3.0.

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

Oct 10 '08 #8
On Fri, 10 Oct 2008 13:51:46 -0700, Wndr <so*****@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.
Oct 11 '08 #9
Wndr <so*****@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 - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Oct 11 '08 #10
"Hillbilly" <so******@somewhere.comwrote in message
news:eO*************@TK2MSFTNGP03.phx.gbl...
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

Oct 11 '08 #11
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.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.
Oct 12 '08 #12
Wndr <so*****@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 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.

--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Oct 14 '08 #13
No they look different.
I think you are right, but what should I change on machine?
Thank you.

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP*********************@msnews.microsoft.com. ..
Wndr <so*****@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 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.

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

Oct 14 '08 #14
Wndr <so*****@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 - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Oct 14 '08 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: FAQPoster | last post by:
An HTML version of this document is available at: http://www.mvps.org/access/netiquette.htm Feeling left out? Alone? Wondering why everyone's ignoring you? Or why you're being flamed for what...
1
by: Simeon Nevel | last post by:
As a personal exercise, I'm trying to create a call tracking DB for my own use at work. Here's an abbreviated version of the database layout: Company: CompanyID - Primary Key (Text Length...
4
by: Jozef | last post by:
Hello, I have forms in my database that use grey as the back color. When I convert them to XP, They all look goofy. The grey becomes two tone. The grey used in the controls are dark, the grey...
1
by: Shell | last post by:
Hi, I have an application written in ASP.NET 2.0, I would like it's GUI especially the webpart to look like windows xp like transparent look or 3D look. I have looked at option of Borderstyle...
0
by: eselk | last post by:
I'm using Access 2000. I've got a basic look-up combobox on a form (moves to selected record on update). The key field and the look-up field are both indexed, and the speed if fast enough for me....
20
by: Maurice | last post by:
Hi all, I have an application, designed in Visual Studio 2005, which will run mainly on Windows XP computers. If I run the application on a Windows XP computer having the Windows XP Theme...
4
by: Laurel | last post by:
Is there a way, in the debugger, to look at the contents of a dataset? I tried drilling down into my dataset and it's like exploring the registry! Anyway, I didn't find anything useful. The code...
3
by: Pascal Cloup | last post by:
Hi, all the installers that i create with VS2005 (with deployement projects) have a flat look and feel under windows XP (flat rectangle buttons). Even the installers created with VS2003 (and...
5
by: Neil Cerutti | last post by:
For use in a hand-coded parser I wrote the following simple iterator with look-ahead. I haven't thought too deeply about what peek ought to return when the iterator is exhausted. Suggestions are...
11
by: Peted | last post by:
Im using c# 2005 express edition Ive pretty much finished an winforms application and i need to significantly improve the visual appeal of the interface. Im totaly stuck on this and cant seem...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.