restart application

  • Thread starter Thread starter aa
  • Start date Start date
aa said:
How to write windows application in VB.NET , which on getting the error
should restart

Maybe something like this (sorry if I got the syntax a bit twisted up Iam
not VB programmer):

TRY
Application.Run(new MainForm())
CATCH e as Exception
Process.Start("myapp.exe")
END
 
cody said:
Maybe something like this (sorry if I got the syntax a bit twisted up Iam
not VB programmer):

TRY
Application.Run(new MainForm())
CATCH e as Exception
Process.Start("myapp.exe")
END

I would at least ask the user if he/she wants to restart. Imagine an
application that always causes the same error and thus will restart
repeatedly.
 
Back
Top