State two differences between the unload method and Hide method as used in Visual Basic program forms.
Answer:
Unload Method:
Function: The Unload method removes the form from memory completely.
Behavior: When a form is unloaded, it is destroyed, and all associated resources are freed. Any data or state within the form is lost, and it needs to be reloaded or recreated to be shown again.
Usage: Use Unload when you no longer need the form and want to free up system resources.
Hide Method:
Function: The Hide method makes the form invisible but keeps it in memory.
Behavior: When a form is hidden, it remains in memory, and its state and data are preserved. The form can be made visible again without the need for reinitialization.
Usage: Use Hide when you want to temporarily remove the form from view but retain its state for later use.