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 ?
Printable View
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 ?
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
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]
Yeah, that will free up memory.
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