|
-
Feb 27th, 2001, 12:25 PM
#1
Thread Starter
Addicted Member
How do I load multiple instances of the same form?
I get an "object already loaded" error when I use frm.show
-
Feb 27th, 2001, 12:34 PM
#2
_______
<?>
'this what you are after
Code:
Private Sub Command1_Click()
Dim frm As Form
Dim x As Integer
For x = 1 To 4
Set frm = New Form1
frm.Visible = True
Next
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Feb 27th, 2001, 03:18 PM
#3
Thread Starter
Addicted Member
-
Feb 27th, 2001, 03:45 PM
#4
Thread Starter
Addicted Member
How do I distinguish between the forms once I've loaded them?
I'm only able to unload the one that I loaded "directly" (load frm) and not the one that I loaded through a variable (dim frm2 as Form, set frm2 = new frm)
-
Feb 27th, 2001, 03:48 PM
#5
Hyperactive Member
Achichincle
VB6 (VSEE SP5, W2KPro)
ASP
HTML
-
Mar 1st, 2001, 08:41 PM
#6
Lively Member
best thing is when you new up an instance is to add it to a collection. The you have somewhere to retrieve them from.
Code:
dim frmInstance as form1
set frmInstance = new form1
colForms.add frmInstance, cstr(frmInstance.hWnd)
You can use the handle of the form as a key for it, so if you want to retrieve a specific form you can. You can always create your own keys as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|