Question Form load event fires once

JimM

Member
Joined
Jun 21, 2011
Messages
6
Programming Experience
10+
Hello,

I have a form for which the form load event only fires one time. When the program starts. It will not fire again until I end the program and restart. I have tried .show and .showdialog, but it acts the same. I have read about form load events loosing the handles, but my code looks exactly like it should.

Here is the load event code

PrivateSub frmBilling_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
LoadClients()
LoadTherapists()
LoadCPT()
EndSub



Here is the code that calles the form.

PrivateSub BillingToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BillingToolStripMenuItem.ClickfrmBilling.Show()
frmbilling.show()
EndSub


Thanks for any help that is provided.

Jim
 
Are you closing the form or just hiding it? The Load event is raised once for each form object. If you create one form object and continually hide and show it then you'll only get one Load event. You must close a form to destroy it rather than hide it. That way, the next time you want an instance of that form displayed, a new object will be created.
 
Back
Top