CSharp/C# >> Windows XP look n Feel

by Abhishek Bagga » Fri, 11 Mar 2005 12:45:21 GMT

Hi!

I want my .net application to have a windows look n feel.
How can i enable this. I have tried 1 or 2 third party tools but not very
satisfied with them
As far as possible I would like to avoid third party tools.
Is there any way out
Pls suggest

Abhishek



CSharp/C# >> Windows XP look n Feel

by Alexander Shirshov » Fri, 11 Mar 2005 13:00:56 GMT


Add this before showing any form:

Application.EnableVisualStyles();
Application.DoEvents();

HTH,
Alexander

CSharp/C# >> Windows XP look n Feel

by Abhishek Bagga » Fri, 11 Mar 2005 13:21:38 GMT


Thanks for the response. I tried this but i think this works only if i have
XP running on my system.
I want a XP look n feel even on the Client systems which have Win 2000
running on them

Abhishek

CSharp/C# >> Windows XP look n Feel

by Alexander Shirshov » Fri, 11 Mar 2005 13:42:22 GMT

Then short answer: you'll need to do all drawing yourself. It's a lot of
work, and my guess you don't have experience with GDI+ drawing? It's not
very complicated topic but it certainly has issues. My advice: forget it if
you can't find 3rd party library that suits you.

Alexander

CSharp/C# >> Windows XP look n Feel

by Abhishek Bagga » Fri, 11 Mar 2005 14:40:34 GMT

Thanks for the reply.
Actually I have tried the drawing manuallly option as well but was able to
acheive only 60 % of my requirement and that too only for buttons
And moreover its quite time consuming
Maybe I'll search for some third party tool or dll

CSharp/C# >> Windows XP look n Feel

by Cor Ligthert » Fri, 11 Mar 2005 18:33:09 GMT

Affishek,

In addition be aware that using GDI extremely can make your applications
slow and because you show in this threads that it will not be on the most
modern computers, that can be a handicap.

Just my thought,

Cor

CSharp/C# >> Windows XP look n Feel

by knvinh » Sat, 12 Mar 2005 01:02:00 GMT

I think you can find this link useful :
http://www.codeproject.com/cs/miscctrl/xp-style_button.asp

CSharp/C# >> Windows XP look n Feel

by perspolis » Sat, 12 Mar 2005 03:06:16 GMT

I can't find the Application.EnableVisualStyles() method..where
is located??





very

CSharp/C# >> Windows XP look n Feel

by Alexander Shirshov » Sat, 12 Mar 2005 06:00:26 GMT

Application class is defined in System.Windows.Forms assembly.
EnableVisualStyles method was introduced in .NET 1.1. Are you using .NET
1.0?

HTH,
Alexander

CSharp/C# >> Windows XP look n Feel

by perspolis » Sun, 13 Mar 2005 00:50:07 GMT

No I'm not using .Net framework 1.1
thx

CSharp/C# >> Windows XP look n Feel

by perspolis » Sun, 13 Mar 2005 01:34:50 GMT

I have already .Net framework 1.0347.then I first I uninstall it and after
that install .Net framework 1.1..unfortunately now when running visual
studio,it says u musy install C# compiler again :(..
does it need to install it??or can i configure it to work??

CSharp/C# >> Windows XP look n Feel

by Alexander Shirshov » Sun, 13 Mar 2005 02:25:33 GMT


CSharp/C# >> Windows XP look n Feel

by Alex » Tue, 22 Mar 2005 03:01:36 GMT


A similar question.

If I am writing an IDTExtensibility2 Office add-in, where should I put the abovementioned code?

CSharp/C# >> Windows XP look n Feel

by Alex » Tue, 22 Mar 2005 03:04:12 GMT


Should I also set the FlatStyle property to System even if I use the 1.1 framework and call Application.EnableVisualStyles() ?

Similar Threads

1. Giving Windows XP look and feel to ASP.NET AJAX Website

Hi,
I am using ASP.NET 2.0.So is it possible to give windows XP Look and Feel to 
my ASP.NET AJAX Website irrespective of operating system in which browser of 
end users are running.I want to do this without using third-party component.
I have searched high and low on the internet but i am not able to find any 
solution without using third-party component.
Any insights on this would be highly appreciated.
Thanks in advance for replying(as always)

With Warm Regards,
Manish Bafna.
MCP and MCTS.

2. XP Look and Feel in Windows 2000 using vc++ 6.0

3. XP Look and Feel in Windows 2000 using ComCtrl32.dll

Hai
   I Want to have a XP Look and feel under windows2000 using VC++ and
ComCtrl32.dll and does any one have any idea please help me as basically iam
looking to develop a Skin
         Waiting for your reply
                                       suresh



4. XP Look and Feel in Windows 2000 using vc++ 6.0 - VC MFC

5. look and feel windows XP for menu bar

6. How to get XP look and feel for windows forms run in win2K - VB.Net

7. Windows XP Look & Feel

Hi,

I am just getting back into programming on the Windows platform, the last 
time was with Win32s.  Anyway I have purchased Visual Studio .NET 2003 Pro 
and am using both Basic and C++ for my project.  I am however noticing that 
the forms that I create are nice, but they don't have that Windows XP look 
and feel.  I guess what I mean by this is my buttons looks like Windows 2000, 
not the gradient look.  There are a host of other differences, like I notice 
Microsofts products have icons next to the text in the drop down menus.

My question is, did I not install something or is this something I am not 
setting up?  It really is  not all that important, just was curious as too 
the reasoning.

Jhan M. Jensen
StarBlue

8. xp look and feel for winforms controls in non xp-based systems - .Net Framework