rocky050371
asked on
Form Level Scope
When declaring / launching a new form a menu item, should the variable be set to module level rather than procedure, what is the best practice.
_form = New ListForm()
_form.Show()
or dim frm as form = new ListForm
_form = New ListForm()
_form.Show()
or dim frm as form = new ListForm
if you do not need the reference to your _form from elsewhere then in the procedure, declare it local to the procedure
It might be useful to declare it at the form/class level if you want to keep an easy reference so you can allow only one instance of the form to be opened at any one time.
*They are others ways of doing this as well.
*They are others ways of doing this as well.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.