VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Creating forms at run time

by Aadish Tiwari (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 23rd January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Creating forms at run time

API Declarations


'place a text box and a command button over it
'the text box will hold value i.e the no of the forms to create and clicking
'the command button will create the forms
Dim i As Integer

Rate Creating forms at run time



Private Sub Command1_Click()
    For i = 1 To Text1.Text  ' run the loop from 1 to text1.text no of times
        Dim frm2 As frm1     ' create the new instance of form
        Set frm2 = New frm1  ' create a new form 
        frm2.Show            ' show new form 
    Next
End Sub


Download this snippet    Add to My Saved Code

Creating forms at run time Comments

No comments have been posted about Creating forms at run time. Why not be the first to post a comment about Creating forms at run time.

Post your comment

Subject:
Message:
0/1000 characters