how to create a Label dynamically

[b][red]This message was edited by purplehaze at 2003-4-3 6:52:40[/red][/b][hr]
i want to create a label control dynamicaly
any code will be really helpful to me

luv
purplehaze




Comments

  • : [b][red]This message was edited by purplehaze at 2003-4-3 6:52:40[/red][/b][hr]
    : i want to create a label control dynamicaly
    : any code will be really helpful to me
    :
    : luv
    : purplehaze
    :
    :
    Try this;

    'create the label object
    Dim lblNew As New Label()
    'set some properties
    lblNew.Text = "Hello, World"
    lblNew.Left = 100
    lblNew.Top = 100
    lblNew.Visible = True
    'add the control to the form's controls collection
    Me.Controls.Add(lblNew)

    hav fun
    kelvin


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion