Solved

TabControl vertical

Posted on 2002-07-11
4
1,462 Views
Last Modified: 2008-01-09
The TabStrip in VB6 has a property to put the tabs vertical (left or right) or on the bottom.
The TabControl.NET does not have this property anymore.
I looked in the documentation, and for the TCS_BOTTOM and TCS_VERTICAL there is a note saying that "This style is not supported if you use ComCtl32.dll version 6". !!!!

Aside the fact that MS is screwing up applications that used this sytle, comctl6 is available in WinXP along comctl 4.7 or 5. V6 is for the cool skined controls.

So, what I am asking, how to I set by API (or otherwise) the bottom or vertical styles to a .net TabControl? (on Win2000 there is no comctl 6 anyway).
0
Comment
Question by:Azmodan
4 Comments
 
LVL 4

Expert Comment

by:kpkp
ID: 7146367
You could..

Use the old comctrl library.  Right click on the toolbox, select customize toolbox.  Click browse on the com components tab and browse to the location of comctrl32.ocx on your machine.  Click open, then OK or whatever.  

You should then be able to add all of the old comctrl object onto your form and set whatever properties you used to set.

- beware however that you you app then has a dependency on the comctrl library, which needs the be distributed along with your app.  This goes against the .NET way of doing things a little, but it's up to you.

right click on the
0
 

Accepted Solution

by:
Azmodan earned 0 total points
ID: 7148410
neh
I found how... I keep forgeting that beside SendMessage there is also SetWindowLong:

SetWindowLong(tabControl1.Handle, GWL_STYLE, GetWindowLong(tabControl1.Handle, GWL_STYLE) | TCS_BOTTOM);

works like a charm.

Off course, on WinXP it works, but if you put a manifest to use comctl32.dll v6, the API should fail. :(
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9408467
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/Refund

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now