Do Form1.Hide and unload me function is the same?

Asked By 30 points N/A Posted on -
qa-featured

Do form1.Hide and Unload me function in visual basic 6.0 is the same?

Private sub command1_click

Unload me

End sub

Private sub command1_click

Form1.Hide

End sub

I notice that they're both making the form disappear but I was wondering what is their differences?

 

SHARE
Answered By 0 points N/A #102427

Do Form1.Hide and unload me function is the same?

qa-featured

 

The form1.hide is never same to unload form1. 
The Hide Method, simply, takes the form out of view, but is still loaded. you can use form1.show which will show the form exactly as you left it previously. But on using Unload Form1, you are unloading it from the memory and that all controls are lost. on applying form1.show, you will get the form newly loaded with all the controls at the initial stage. However, you can use unload form1 to avoid extra space allocated to memory. If the form’s work is complete, then try unload it. However If you like to get the previous state of the form then you use form1.Hide. 
Please let me know the result.
Thanks
 

Related Questions