How to put objects [labels] within forms
Posted: Thursday 30th June 2022 2:48pm
I am creating forms dynamically and want to place objects (labels, buttons, etc) in them
I have no problem creating the forms, it is attaching/inserting objects
If I can get an example of placing 2 labels in a form, I would be much appreciative
Thank you in advance
I have no problem creating the forms, it is attaching/inserting objects
Code: Select all
' create forms
hForm = New Object[8]
For siCount = 0 To 7
With hForm[siCount] = New Form
.Name = "bForm"
.X = siCount * 50
.Y = siCount * 50
.W = 430
.H = 480
.Caption = "bCache " & Str(siCount) & " Form"
'.Show
End With
With Labelx = New Label(Me) As "Labelx"
.Y = 50
.X = 20
.W = 175
.H = 28
.Alignment = Align.Center
.Font.Bold = True
.Border = Border.Plain
.Text = "Test"
End With
Object.Attach(Labelx, hForm[siCount], "Labelx" & Str(siCount))
Next
Thank you in advance