Search Tools Links Login

Add a control programmatically


Visual Basic 6, or VB Classic

Programmatically add a label to the form and set its caption

Dim objControl As Label
Set objControl = Controls.Add("VB.Label", "lblNewLabel", Me)
With objControl
   .Caption = "Add a label"
   .Left = 100
   .Top = 100
   .Visible = True
End With

About this post

Posted: 2020-08-30
By: vb6boy
Viewed: 256 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.