VB restart form

17,992

Do you mean Application.Restart() ?

Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

  Application.Restart()

End Sub

Although in Visual Basic this does the same as in C#, it restarts the application not just clears the form.

Share:
17,992
hiba salem
Author by

hiba salem

Updated on June 14, 2022

Comments

  • hiba salem
    hiba salem almost 2 years

    I created a button and I need it to restart the form I have no idea how to work on the visual basic what should i write

    Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    
    End Sub
    
  • Nathan Tuggy
    Nathan Tuggy over 6 years
    That just seems like it will create a useless loop.