C # to implement WinXP style control (super simple -zz)

xiaoxiao2021-03-06  14

Environment: WinXP, vs.net2003 method is as follows:

Step 1: Add a statement in the main () function:

Static void main () {Application.enablevisualStyles (); // Add this statement Application.run (New Form1 ());}

Step 2: Select the control you want to use WinXP style, find FlatStyle in the property, set to System.

Compile operation, look at the effect!

Note: 1. Textbox does not have a FlatStyle property, after calling EnableVisualStyles, it will automatically apply new style. 2. If you want to understand the details, search for the intercTl32.dll 6.0, manifest files on the Internet. 3. The implementation of VB.NET is very similar.

转载请注明原文地址:https://www.9cbs.com/read-47260.html

New Post(0)