Solved

TabStrip ZOrder setting

Posted on 2007-03-21
2
303 Views
Last Modified: 2010-05-18
I am using Visual Basic 6.
I have a tabstrip (SSTab1) with 9 tabs.
I want to have the 1st tab as the default tab no matter where I was when I compiled the program.
Looking at the help file it looks like I can use Zorder to do this but I can not get it to work.
How do I use the code and where does it have to be placed.?
Also is it possible to insert a fresh tab on a tabstrip between two previously coded tabs?
0
Comment
Question by:SINCO
  • 2
2 Comments
 
LVL 1

Expert Comment

by:scottmichael2
ID: 18766411
This should work...
Private Sub Form_Load()
    TabStrip1.Tabs(1).Selected = True
End Sub

Right click the TabStrip control and select Properties.  Use arrow buttons on Tabs tab to scroll to the tab to the left of the one you want to add (if you want a tab between tab 2 and tab3 then scroll to tab 2).  Click Insert Tab.  This will place the new tab right after the previously selected tab.
0
 
LVL 1

Accepted Solution

by:
scottmichael2 earned 500 total points
ID: 18766477
Oops - wrong tab control - sorry.  This is how you get it to select the 1st tab every time:
Private Sub Form_Load()
    SSTab1.Tab = 1
End Sub

Unfortunately, I don't think there is a way to insert a new tab in the middle with this particular tab control.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

910 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

25 Experts available now in Live!

Get 1:1 Help Now