Solved

TabControl vertical

Posted on 2002-07-11
4
1,471 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

680 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