how to use theme in winForm

  • Thread starter Thread starter Brian Hu
  • Start date Start date
B

Brian Hu

Hi

I am new to vb.net and trying to build a VB.net winform application. I
really like the new look of buttons, readio buttons etc. on my WinXP box.
But only thing is I cannot make it consistent with my form background color
(greyish by default?). My question is, how can I can change my form
background color using something like XP theme? so they will be consistent
automatically?

BTW, I tried to use background colors provided in the property window (in
VS.Net), but I dont think any of them is consistent with color of controls.

Thanks.
 
Control over look and feel ( meaning blending your app to look like XP)
isn't available in VS 2003. Get the Whidbey beta and you're in like sin.
 
James said:
Control over look and feel ( meaning blending your app to look like XP)
isn't available in VS 2003. Get the Whidbey beta and you're in like sin.

I don't use XP so I can't test it but I had heard that all that is needed is to
be sure a call is made to Application.EnableVisualStyles() BEFORE any
form is loaded in the application. Also, to set the Flatstyle property of
Checkboxes, CommandButtons, RadioButtons, and GroupBoxes to
System (They are set to standard by default).

So the OP would need to add a Sub Main and mark it as the startup
object, and in that routine, make the call to EnableVisualStyles, and
THEN call his main form.

Try and let us know if it works for you....

LFS
 
Application.enablevisualstyles()?
I not getting anything like it from intellisense or in application class
definition...

Point me in a direction...
 
It's only available in Framework v1.1 - wasn't there in v1.0. In 1.0, you
would have to use the manifest file to get the same effect.

Imran.
 
Right on.
Imran Koradia said:
It's only available in Framework v1.1 - wasn't there in v1.0. In 1.0, you
would have to use the manifest file to get the same effect.

Imran.

application. property
 
Back
Top