Solved

TabStrip ZOrder setting

Posted on 2007-03-21
2
301 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

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

20 Experts available now in Live!

Get 1:1 Help Now