Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1479
  • Last Modified:

TabControl vertical

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
Azmodan
Asked:
Azmodan
1 Solution
 
kpkpCommented:
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
 
AzmodanAuthor Commented:
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
 
Bob LearnedCommented:
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

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Tackle projects and never again get stuck behind a technical roadblock.
Join Now