Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Are themes supported in a form?
Message
 
To
29/12/2004 01:42:40
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00972785
Message ID:
00972879
Views:
15
FYI,
There's a bug with EnableVisualStyles(), make sure to call Application.DoEvents() right after. But this does not always work. what i found to always work is to call a separate method to start the app:
static void Main() 
{
	Application.EnableVisualStyles();
	Application.DoEvents();
	Go();
}

public static void Go()
{
      System.Windows.Forms.Application.Run(New Form1)
}
Sorry, i don't know VB. HTH.

>I found by adding:
>
>
>    Public Shared Sub Main()
>        System.Windows.Forms.Application.EnableVisualStyles()
>        System.Windows.Forms.Application.Run(New Form1)
>    End Sub
>
>
>and defining the buttons FlatStyle property to System, this was doing it. However, I have a TabControl and, even if I see it is being styled, the Page 1 of it is having a fixed background. The TabControl doesn't have a FlatStyle property. I don't know where to look to resolve that one.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform