VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



When you create Wizard based application then you have to need create control at run time without u

by Amjad Riaz (1 Submission)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 18th April 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

When you create Wizard based application then you have to need create control at run time without using Control Array..

API Declarations


Private WithEvents CmdObject As CommandButton

Rate When you create Wizard based application then you have to need create control at run time without u



Private Sub CmdObject_Click()
    MsgBox "Click Event is Call"
End Sub
Private Sub Form_Load()
    Form1.Controls.Add "vb.label", "cmdfirst", Form1
    With Form1!cmdfirst
        .Visible = True
        .Left = Form1.Left + 100
        .Top = Form1.Top + 100
        .AutoSize = True
        .Caption = "Enter Caption"
    End With

    Set CmdObject = Form1.Controls.Add("vb.commandbutton", "cmdValue", Form1)
    With CmdObject
        .Visible = True
        .Left = Form1!cmdfirst.Left + Form1!cmdfirst.Width + 100
        .Top = Form1.Top + 100
        .Height = 500
        .Caption = "Dynamic Button"
    End With
   

End Sub
Private Sub cmdValue_Click()
        MsgBox "Click event is call"
End Sub




Download this snippet    Add to My Saved Code

When you create Wizard based application then you have to need create control at run time without u Comments

No comments have been posted about When you create Wizard based application then you have to need create control at run time without u. Why not be the first to post a comment about When you create Wizard based application then you have to need create control at run time without u.

Post your comment

Subject:
Message:
0/1000 characters