Despite having worked with VB for a reasonable amount of time, loading and unloading forms is something I have never truly grasped.
I currently do the following, which I feel is very inefficient, even though it does work.
Opening a form:
Unload Form
Load Form
Form.Show
Closing a form:
Form.Hide
This ensures that the form is always wiped clean before new data is put in it, and also avoids error messages when closing forms that they haven't been closed in the correct order.
However, unloading and loading a form to open it seems wasteful in terms of time.
If anyone could enlighten me on how I could improve this (probably very amateur) technique, I would be very grateful.
I currently do the following, which I feel is very inefficient, even though it does work.
Opening a form:
Unload Form
Load Form
Form.Show
Closing a form:
Form.Hide
This ensures that the form is always wiped clean before new data is put in it, and also avoids error messages when closing forms that they haven't been closed in the correct order.
However, unloading and loading a form to open it seems wasteful in terms of time.
If anyone could enlighten me on how I could improve this (probably very amateur) technique, I would be very grateful.