Answered Resetting a form...

PRo-Beaniie

Well-known member
Joined
Mar 17, 2011
Messages
55
Location
Hertford, Hertfordshire, United Kingdom
Programming Experience
3-5
hey guys,

Im trying to achieve a complete reset of a form i have used. I have a parent form and want to reset the second form... Im completly new to using multiple forms however some researching has lead me to this... as posted by a previous user in 2005

'if it's a form that's opened from another form in the parent form you can make a Friend Sub that will close the current form and make a new instance of it and open it, then when you need the form to be "reset" the form just call the parent form's sub '

This sounds like what i need i just have no idea how to code it can any one help :confused:

Many Thanks,
 
Last edited:
Basically that post was saying that to reset a form, simply close it and open a new instance of that form.

VB.NET:
'From parent form
Private Sub resetForm(frmSub As Form)
  frmSub.Close()
  frmSub.Show()
End Sub

'To call this sub, use something like this:
resetForm(Form2)


Hope this helps
-Josh
 
No problem :)
 

Latest posts

Back
Top