TabControl in VB.NET 2005 not using XP style

A

AbsolutG

I'm trying to use the new tabcontrol in VB.NET 2005. While in design
mode, it looks fine, using the same XP theme as the one I have set in
Windows.

The problem is that as soon as I run the program, the tabcontrol
changes its style to the old gray classic-windows style. I tried
playing around with both DrawMode values available (Normal and
OwnerDrawFixed), as well as any other property I could think of but
nothing has worked to show it with the XP style.

Am I missing something? Any help would be appreciated.

Thanks!
 
H

Herfried K. Wagner [MVP]

AbsolutG said:
I'm trying to use the new tabcontrol in VB.NET 2005. While in design
mode, it looks fine, using the same XP theme as the one I have set in
Windows.

The problem is that as soon as I run the program, the tabcontrol
changes its style to the old gray classic-windows style.

I am not able to reproduce this problem using the final version of VS 2005
Professional on Windows XP Professional SP2. Does the problem even occur in
a simple test project?
 
J

Jeff Johnson [MVP: VB]

Please do not crosspost .NET questions to the *.vb.* groups. They are for
VB6 and earlier. Stay within the *.dotnet.* groups. Thanks.
 
H

Herfried K. Wagner [MVP]

Jeff,

Jeff Johnson said:
Please do not crosspost .NET questions to the *.vb.* groups. They are for
VB6 and earlier. Stay within the *.dotnet.* groups. Thanks.

That's indeed true, but I am afraid that an increasing number of users will
post VB 2005-related questions to the Classic VB groups because Microsoft
has dropped the ".NET" from the product names.
 
Y

Yuri O

1)Make sure you are not using on your form any legacy activex control(s) as
it will damages XP style.
2) Application.EnableVisualStyles is used.

Thanks
-Yuri
 
J

Jeff Johnson [MVP: VB]

That's indeed true, but I am afraid that an increasing number of users
will post VB 2005-related questions to the Classic VB groups because
Microsoft has dropped the ".NET" from the product names.

Ohhhhh, trust me, that is DEFINTELY the case!
 
A

AbsolutG

Sorry about the crosspost. Details like those are not exactly public
knowledge, but now I know for next time.

Anyway, I found the solution. I simply went to the application
properties and checked the "Enable Application Framework" option (it's
unchecked by default). Once this is done, it enabled some more
properties, one of them being "Enable XP visual styles". I just made
sure that it was checked and that was it!

I didn't try the Application.EnableVisualStyles option but my guess is
that that could have worked too.

Thanks!
 
J

Jan Hyde

"Herfried K. Wagner [MVP]" <[email protected]>'s wild
thoughts were released on Thu, 22 Dec 2005 02:34:20 +0100
bearing the following fruit:
Jeff,



That's indeed true, but I am afraid that an increasing number of users will
post VB 2005-related questions to the Classic VB groups because Microsoft
has dropped the ".NET" from the product names.

People generally only need to be told once.


Jan Hyde (VB MVP)
 

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