Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reload windows form without closing it using VB.NET?

Tags:

vb.net

Can you please tell me how I can reload a windows form without closing it using VB.NET?

like image 746
Selom Avatar asked Mar 12 '10 13:03

Selom


People also ask

How do I refresh a Windows Form in VB net?

The simplest solution might be to just do the clearing by hand. Alternatively, you can put all your controls into a user control container. Then just instantiate that user control on your form. If you want to reload your form content, you now just need to remove and re-instantiate the user control.

How do I refresh winform?

You can use the Form. Invalidate(); or Form. Refresh(); methods.

How do I close a Windows Form in VB net?

If you want to close the form then use Me. Close() instead. The Load event will fire again when you create the new instance.

What is form load in Visual Basic?

The Form Load Event in VB . NET. An important event you'll want to write code for is the Form Load event. You might want to, for example, set the Enabled property of a control to False when a form loads. Or maybe blank out an item on your menu.


1 Answers

Application.Restart()

Shuts down the application and immediately opens a new instance.

like image 187
Dan Avatar answered Oct 07 '22 11:10

Dan