Hi,
I just noticed the Progressbar control doesn't have a flatstyle so I can't set it to System.
How do I get this effect on the control?
Thanks
Printable View
Hi,
I just noticed the Progressbar control doesn't have a flatstyle so I can't set it to System.
How do I get this effect on the control?
Thanks
Add the bold line of code to the New() sub of your form.
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
Application.EnableVisualStyles()
End Sub
hmm.... didn't have any effect... me very clueless :confused:
This has been answered in this forum before, but I can't find it. Searching for "EnableVisualStyles" brings up no results. But here's how you do it.
First:
VB Code:
Public Shared Sub Main() System.Windows.Forms.Application.EnableVisualStyles() System.Windows.Forms.Application.Run(New Form1) End Sub
Then, for buttons and anything that has a FlatStyle property, set it to System instead of the default value of Standard.
HTH,
Mike
didn't help... i haven't got a problem with anything else. my buttons and everything work fine. it's just the blasted progress bar
What version of VS are you using? Is it 2002? There's a different way to do it in 2002, if I remember correctly.
I attached a project for an example, but it is VS 2003. I did have to change the startup object to sub main instead of form1.
Mike
hmm... i'm beginning to think it's probably WindowsBlinds doing it...
I don't see progress bars for some weird reason in .NET with WindowsBlinds on
Edit: Yeah, so it is.... i just got rid of windowsblinds, put the default xp style back on, and it shows now! How silly lol, oh well
I dont use any apps like that on my development PC because not only can things like that happen, but also you kind of develop the GUI for what looks good with your window blinds theme, and not with what 99% of the users will be looking at, which is windows with its default settings.