private const int FALSE = 0; private const int TRUE = 1; [DllImport("UxTheme.dll")] private static extern int IsThemeActive();
if(Environment.OSVersion.Version.Major >= 5 && Environment.OSVersion.Version.Minor >= 1) { if ( IsThemeActive() == TRUE ) MessageBox.Show("Themed !"); else MessageBox.Show("Coq inside !"); } else { MessageBox.Show("Non supporté !"); }
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <dependency> <dependentAssembly> </dependentAssembly> </dependency>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question/// <summary> /// Search the control for button type control and set the FlatStyle /// of these buttons to System. This method searches Recursively into /// control within control. /// </summary> /// Control to search children of /// <example><code> /// [C#] /// /// Form1 f = new Form1(); /// //Passe a system toutes les propriete flatstyle de tout les objet de la form /// FormatForWinXP(f); /// ///</example>
Application.EnableVisualStyles(); Application.DoEvents(); Application.Run(...
If you call DoEvents in your code, your application can handle the other events. For example, if you have a form that adds data to a ListBox and add DoEvents to your code, your form repaints when another window is dragged over it. If you remove DoEvents from your code, your form will not repaint until the click event handler of the button is finished executing. Typically, you use this method in a loop to process messages
/* The program is running under Windows XP or higher */ if(Environment.OSVersion.Version.Major >= 5) { Application.EnableVisualStyles(); Application.DoEvents(); }