akrant_iOSDeveloper
akrant_iOSDeveloper

Reputation: 373

How to relaunch running application

i am working on an win mobile application . I am running application in background using

e.Cancle = true;

Now i need to relaunch same instance of that application so that i can off that application .

can any one tell me ... how to do this?

Upvotes: 0

Views: 707

Answers (3)

John Alexiou
John Alexiou

Reputation: 29244

This might do it.

System.Diagnostics.Process.Start(Application.ExecutablePath);
Close();

Upvotes: 0

Simon_Weaver
Simon_Weaver

Reputation: 145880

If the application needs to restart itself this may help you :

http://msdn.microsoft.com/en-us/library/system.windows.forms.application.restart.aspx

You don't actually need to be running a winforms application for this to work - you just need to make sure the System.Windows.Forms DLL is present.

PS. i couldn't get this working for WPF - but I don't actually remember the exact reason right now

Upvotes: 1

Related Questions