473,326 Members | 2,147 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,326 software developers and data experts.

Use the current Windows Theme/style

Hi all, being new to C# (not to C++), when I create a windows form and run
it, regardless if the windows operating system is using the "new" XP theme
or the "old" 95/98/2000 styled theme, my forms use the old 95/98 style
theme.

How do I get the new XP "look and feel" theme for my buttons and tab panes
and other controls? You know, the one where if you hover the mouse over
button, a thin yellow line at the base appears.

Using MFC / win32 API, I would add a manifest xml file.

What do I do in C#? And is there an online tutorial / sample?

Thanks all in advance...
Nov 17 '05 #1
1 2884
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(yourFormContext);

before loading the form and set the components' FlatStyle property to
"System".

Nov 17 '05 #2

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

Similar topics

0
by: Chenghui Li | last post by:
We have a problem with the Windows XP theme: We have a IDE which allows other developers to develop visual programs for their customers. Our IDE allow them to set font for window captions easyly...
0
by: damiensawyer | last post by:
Hello all, I'm very new to all of this. I have a theme and a skin (the standard ones). I have a standard master page which is holding a custom ascx which has a treeview in it. Can someone...
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...
0
by: Brant Estes | last post by:
So try this. Create a new ASP.NET 2.0 website. Add a theme. Add a skin to the theme. In your web.config, add the <pages theme="MyTheme" styleSheetTheme="MyTheme" /tag under your system.web...
5
by: bobdydd | last post by:
Hi All I am just getting to grips with Access 2007 and one of the quirks I have found is that when I design using Windows in XP Windows-Classic colors and set the text boxes on forms' special...
11
by: greg | last post by:
Hi all, Is there a way to get the current theme name at design time? I'm trying to write a custom control for which I need to use images from the current theme. I have asigned a theme to the...
1
by: R.A.F. | last post by:
Hi, I develop my own control, however i would like to keep them in phase with Windows Theme. for example, if i have a custom button, i would like also to offer to user the possibility to...
1
by: manatlan | last post by:
I understand nothing ... I'm trying to get the color of a normal background window and when I change my themes (i switch between a light and a dark theme) i obtain always the same output below...
8
by: Mateusz Viste | last post by:
Hi, I'm not sure if my question is really related to JavaScript, so please excuse me if that's not the case (and maybe you guys would have an idea what's the cause is and where could I ask)... ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.