Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 142253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:54:25+00:00 2026-05-11T07:54:25+00:00

I am trying to update an old VB6 application. I am struggling with changing

  • 0

I am trying to update an old VB6 application. I am struggling with changing the backcolor of the SSTab control at runtime.

I know that I cannot just set the Backcolor to the required colour.

At designtime I have created a label on each tab and then resized the label to the sstab dimensions. Then I set the label backcolor. This works fine.

However, what I really want to do is to do this at runtime so that if a new tab control is added on a form in the future I dont need to manually do this at designtime each time.

I would be grateful if someone can point me in the right direction to create and display a label on every tab of a SSTab control at runtime?

I dont have frames on all the tabs so I dont want to use the frame container to hold the label. I would rather just have the label placed on the tab container at runtime.

Thanks and I look forward to your replies.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T07:54:26+00:00Added an answer on May 11, 2026 at 7:54 am

    As svinto says, you can load new controls to a Control Array, but there’s a bit more to it than that.

    Firstly the new controls are not Visible, so you must set .Visible=True You also need to set the current tab before creating the control to get it sited on that tab.

    Assuming you already have the first label on the first tab:

    For i = 1 To Me.SSTab1.Tabs - 1     Me.SSTab1.Tab = i     Load lblOne(i)     lblOne(i).Visible = True Next 

    Also, this doesn’t work in the Form_Load event, but does in Form_Activate

    There is another method to create the Labels from scratch rather than using a Control Array, which might be better as you don’t need to add the first Label to the form:

    Private Sub Form_Activate()     Dim lbl() As Label     Dim i As Integer     Dim name As String     ReDim lbl(SSTab1.Tabs - 1)    For i = 0 To Me.SSTab1.Tabs - 1         Me.SSTab1.Tab = i         name = 'MyLabel' & CStr(i)         Set lbl(i) = Form1.Controls.Add('VB.Label', name)         Set lbl(i).Container = Me.SSTab1         lbl(i).Visible = True         lbl(i).Caption = name         lbl(i).Move 40, 345         lbl(i).BackColor = vbGreen     Next End Sub 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 268k
  • Answers 268k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Previous to terminal service 6.1 you accessed the "console session"… May 13, 2026 at 1:06 pm
  • Editorial Team
    Editorial Team added an answer There is a nice list of the available context properties… May 13, 2026 at 1:06 pm
  • Editorial Team
    Editorial Team added an answer If there's multiple threads within that process, you'll need to… May 13, 2026 at 1:06 pm

Related Questions

I am using eclipse / subclipse for development. I also have the TortoiseSVN client.
I'm using a remote 3rd party storage solution that does not have support for
I'm trying to sanitize/format some input using regex for a mixed latin/ideographic(chinese/japanse/korean) full text
I have an application that has a UITableView. This UITableView is populated by an

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.