Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Positioning controls at runtime

Status
Not open for further replies.

bill1234

Technical User
Jan 21, 2002
3
US
Hi there, in my program im creating and positioning text box's and labels at runtime. The problem is, when i run the program on a different machine the positioning is different, even if the resolutions are the same.

Private Sub build_label(ByVal varString As String)
Dim intLbl As Integer

intLbl = Me.getNumLblCtrl + 1
Load lblDyn(intLbl)
With lblDyn(intLbl)
.Visible = True
.Top = lblDyn(intLbl - 1).Top + _
lblDyn(intLbl - 1).Height + 50
.Width = Len(varString) * 125
.Caption = varString
End With
Me.setNumLblCtrl = intLbl
End Sub

Ive gone so far as specifying a fixed width font for
lblDyn(0) and I still get the same results.
Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top