Windows XP Look in my windows forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What does one need to add to the app.config file to have my controls rendered in the windows xp look and feel?

Thanks,
Jeff
 
* "=?Utf-8?B?SmVmZg==?= said:
What does one need to add to the app.config file to have my controls rendered in the windows xp look and feel?

In the app's 'Main' procedure, add this code:

\\\
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(New Form1())
///

Set the controls' 'FlatStyle' property to 'System' (where available).
 
What does one need to add to the app.config file to have my controls
rendered in the windows xp look and feel?
In the app's 'Main' procedure, add this code:

\\\
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(New Form1())
///

Set the controls' 'FlatStyle' property to 'System' (where available).

--
Yep, this will do only with .Net 1.1, but if you use 1.0 or you want your
application to have visual styles enabled on .Net 1.0, the you should create
..manifest file gor your application, it should be named as
[yourapp].exe.manifest, and should be kept within the app folder.
 
The manifest file works only for terminals with XP as their OS. What if I am to run my application in lower versions of Windows? Is there an ocx that can convert my controls to an XP-looking stuff? Besides if you are going to use the manifest file, there would be some problem on option buttons.
 
* "=?Utf-8?B?QW5uZQ==?= said:
The manifest file works only for terminals with XP as their OS. What
if I am to run my application in lower versions of Windows? Is there an
ocx that can convert my controls to an XP-looking stuff? Besides if you
are going to use the manifest file, there would be some problem on
option buttons.

There are controls available which replace the standard controls, but I
wouldn't run an application with Windows XP Visual Styles on a Windows
2000 machine.
 
Back
Top