Modern looking buttons? (not tool bar buttons)

  • Thread starter Thread starter johnb41
  • Start date Start date
J

johnb41

I don't know why I never noticed this before... but in VS 2003, when i
drag a button (or combobox, etc) onto the form, it defaults to a hard
chisseled rectangle.

But in just about all the programs I use (except maybe some very old
ones) the buttons are much slicker looking: rounded, with a slight
border around which responds to a rollover.

I'm tinkering with VB 2005 Express Edition, and by default the buttons
are really modern, like I explained above. Same thing with the
combobox and other common controls.

Is VS 2003 not able to do this without alot of effort, or buying a 3rd
party solution?

Thanks!
John
 
johnb41 said:
But in just about all the programs I use (except maybe some very old
ones) the buttons are much slicker looking: rounded, with a slight
border around which responds to a rollover.

I'm tinkering with VB 2005 Express Edition, and by default the buttons
are really modern, like I explained above. Same thing with the
combobox and other common controls.

Enabling Windows XP Visual Styles for Windows Forms applications
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=xpvisualstyles&lang=en>
 
Thanks, but this isn't working for me.

Where do I put the code:

Application.EnableVisualStyles()
Application.DoEvents()

I tried it in the load event of the first form that shows up. I also
put it in a module that has many other popular functions in it:

Module SubsAndFunctions
Sub main()
Application.EnableVisualStyles()
Application.DoEvents() ' Bug fix.
End Sub

' other functions go here...

End Module


I also set the flatstyle of a button to "system".

The button still appears old-fashioned.

Any idea what I'm doing wrong?
Thanks,
John
 
If you don't have your desktop running windows xp, and using windows xp
style itself, it will override your buttons. Ie. if you have changed the
them to windows classic.
 
johnb41 said:
I tried it in the load event of the first form that shows up. I also
put it in a module that has many other popular functions in it:

Module SubsAndFunctions
Sub main()
Application.EnableVisualStyles()
Application.DoEvents() ' Bug fix.

\\\
Application.Run(New MainForm())
///

In the project properties, select 'Sub Main' as startup object.
 
I should read replys more carefully! I didn't see the
"Application.Run" part, so this wasn't working.

But all is well. It works! Thanks so very much!!! :)

John
 
Hmmm... The main startup form has the nice new look, but all my other
forms do not. I thought what I did would make a global change to my
entire app.

How can I get all my other forms on the app to get the same look?

Thanks,
John
 

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

Back
Top