|
-
Sep 14th, 2000, 06:45 AM
#1
Thread Starter
Hyperactive Member
I read this http://209.207.250.147/showthread.php?threadid=27514
but I didn't get it . I have a from called frm_Pm . What I want is to be able to make mutiple instances of it . It's to send personal messages in a winsock app . How is this done ?
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Sep 14th, 2000, 06:55 AM
#2
Addicted Member
Hi PRIVATE1,
Code:
Dim frmcnt As Integer
Dim NewFrm() As frm_Pm
Sub CreateNewInstance()
frmcnt = frmcnt + 1
Redim Preserve NewFrm(frmcnt)
Set NewFrm(frmcnt) = New frm_Pm
With NewFrm(frmcnt)
.Visible = True 'Shows the new form
'You can do anything to the new instance of the form here.
End With
End sub
-
Sep 14th, 2000, 07:02 AM
#3
Thread Starter
Hyperactive Member
Thank you 
BTW if I create these froms when I'm done using them Should I Unload them With the Unload Statement ?
[Edited by PRIVATE1 on 09-14-2000 at 08:05 AM]
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Sep 14th, 2000, 07:46 AM
#4
Addicted Member
Yeah, that will free up memory.
-
Sep 14th, 2000, 03:03 PM
#5
The resources are automatically freed when WM_DESTROY is called, however, you can be extra safe and use Set Form = Nothing to free up resources.
Code:
Unload MyForm
Set MyForm = Nothing
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
|