how to use theme in winForm

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.
 
J

James

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.
 
L

Larry Serflaten

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
 
J

James

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

Point me in a direction...
 
I

Imran Koradia

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.
 
J

James

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
 

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

Top