Solved

Removing Tab Control  Header

Posted on 2002-04-23
5
362 Views
Last Modified: 2010-05-03
Hi,

I have created a tab control with 5 tabs. I am using tab control just to organize the information however I want to change the active tab programatically. For that I need to remove/hide the header that let user change the tab. Can I hide the header somehow. Any help would be appreciated. Solution may be in VB.Net or VB6 however solution is required in VB.Net.
Thanks

Akhwand
0
Comment
Question by:akhwand
5 Comments
 
LVL 3

Accepted Solution

by:
kenspencer earned 50 total points
ID: 6963919
Hi,

I can give you a method where you do not have to hide the tab header but can retain control.  My example:

    A form with a tab control (named SSTab1) and a Command Button (cmdPgmTab)

Option Explicit

Dim Master As Boolean

Private Sub cmdPgmTab_Click()
Dim x As Integer

    Master = True
    x = SSTab1.Tab + 1
    If x = 3 Then x = 0
    SSTab1.Tab = x
           
End Sub

Private Sub Form_Load()

    Master = False

End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)

    If Master = False Then
        Master = True
        SSTab1.Tab = PreviousTab
    End If
   
    Master = False
   
End Sub

This way you have programmatic control of the tabs (by setting Master = True and then setting the tab you want).

Ken
0
 
LVL 3

Expert Comment

by:kenspencer
ID: 6963924
By the way, my example just has 3 tabs; any number would work.

Ken
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6964344
The easiest way to make the TABS "almost" disappear, is to set the Tab Height property to 1 (cannot set it to 0, as that is an "invalid value"), but with a height o 1 Twip, the tabs are essentially gone.

By the way, what you are creating is commonly called a "wizard", as it leads the user through the steps of the application, allowing the developer to have a great deal of control over what happens, and when.

This is precisely how the Package and Deployment Wizard functions, for instance.

Arthur Wood
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7660744
Hi akhwand,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: kenspencer and Arthur_Wood@devx

akhwand, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7755446
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange

Arthur_Wood: points for you at:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20463733.html
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 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

17 Experts available now in Live!

Get 1:1 Help Now