Recent Posts

Wednesday, September 2, 2009

How to restart .net 1.0 application automatically?

If you want your .net 1.0 application restart automatically then this article has the solution. Also it sloves the problem like waiting until the previous instance of the .net application is killed and restarting itself.

Private Sub RestartApp()
Application.Exit()
'Waits some time for the application to exit
System.Threading.Thread.Sleep(5000)
System.Diagnostics.Process.Start(Application.ExecutablePath)
' End the current process
Process.GetCurrentProcess.Kill()

End Sub

Related Posts by Categories




No comments:

Post a Comment