It said that
Unload Form2
will remove Form2 from the memory. However, following code shows it is not true:
Private Sub Command1_Click()
Form2.Show
Form2.Text1 = "Form2 shown."
Unload Form2
Form2.Text1 = "Form2 unloaded." 'We can set text in Form2.Text1 although Form2 was unloaded
Form2.Show 'After loading and showing Form2 again, Form2.Text1 will be "Form2 unloaded."
End Sub
Why??
Unload Form2
will remove Form2 from the memory. However, following code shows it is not true:
Private Sub Command1_Click()
Form2.Show
Form2.Text1 = "Form2 shown."
Unload Form2
Form2.Text1 = "Form2 unloaded." 'We can set text in Form2.Text1 although Form2 was unloaded
Form2.Show 'After loading and showing Form2 again, Form2.Text1 will be "Form2 unloaded."
End Sub
Why??