-
Hi..
I am trying to load a number of labels
and it doesn't seem to work at all.
why not?
Code:
For i = 1 To UBound(sTxt)
Load PopupText.ltxt(i)
With PopupText.ltxt(i)
.Caption = sTxt(i)
.Move 20, (i * 200) + 20
.borderstyle = 1
.ForeColor = &H80000017
.BackColor = &H80000018
.Visible = True
End With
Next i
-
check your spelling, put an option explicit on top of your files, the code seems to be ok, maybe PopupText.ltxt isn't a control array. Do you get any errors?
-
kedaman,
Hey.. I always use Option Explicit.
And there are no errors what so ever.
To give you more detail. The labels
are loaded fine.. the only problem is
you can not see the text ( I debug printed
the string array and its fine).
You can see the text when I set the
backstyle to 0, but not 1.
Whys that?
-
Backstyle=0 means the control is transparent. The text is drawn directly on the form, and if the form and the text is the same color, you can't see it. I can't think of any other reasons, since it works for me.