Vb6 changing colors of SSTab at runtime using label in the background?

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

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.

Create one label at design-time, and set it's index to 0. You can later on do Load labelname(newindex) to create more instances of the label. Position them once created, set the background color and you're all done.

This is what exactly you need to do. – RS Conley Mar 10 '09 at 12:06.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions