Solved

TabControl vertical

Posted on 2002-07-11
4
1,472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…

739 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