Visual styles an .NET Framework 2.0

E

Emmanuel

In .NET Framework 1.1 in order to enable visual styles we had to code:

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

before anything visual, and then set the FlatStyle attribute of the controls
to FlatStyle.System.

Is all these needed on version 2.0 in order to achieve the same behaviour
(XP like controls) ?

Thanks
Emmanuel
 
G

Guest

From the VS.net 2005 help:

"Prior to the .NET Framework 2.0, the FlatStyle property of some controls,
such as controls that derive from ButtonBase, had to be set to
FlatStyle.System in order for the controls to be drawn with visual styles. In
applications written with the .NET Framework 2.0, this is no longer
necessary."

Tony
 
E

Emmanuel

Thanks tlkerns.

The call to EnableVisualStyles method is still needed ?

Emmanuel
 
G

Guest

Yes, but instead of coding it manually, you can set it in the project
property sheet. Just right click your project and select Properties from the
context menu. "Enable XP visual styles" is on the Application tab.

Tony
 
E

Emmanuel

Thanks Tony.

tlkerns said:
Yes, but instead of coding it manually, you can set it in the project
property sheet. Just right click your project and select Properties from
the
context menu. "Enable XP visual styles" is on the Application tab.

Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top