Gold
Gold

Reputation: 62544

How to reset my program (close.. and Open again) - Windows mobile

How to reset my program (close.. and Open again)

in C# windows-mobile ?

Upvotes: 0

Views: 1101

Answers (4)

Alex
Alex

Reputation: 3382

Create a WinMo cmdline project in your solution and use Process.Start(appPath + @"\yourprogram.exe", String.Empty); (you can use Thread.sleep too before the Process.Start) in your main program use Application.Exit and after that use a Process.Start to the loader application. Maybe pass bye a parameter too then from the loader application cannot start your app only if you do it from your code and pass that "key" to the other app.

I hope it helps

Upvotes: 1

ctacke
ctacke

Reputation: 67188

P/Invoke CeRunAppAtTime with yourself as the target and 11 seconds in the future as a time, then exit the app.

Upvotes: 0

Naruto
Naruto

Reputation: 9634

You need to have scheduler for that. Then Perform cocreateinstence, then set the parameters, then save the task.. application triggers when the scheduler runs..

Upvotes: 0

Umair Ahmed
Umair Ahmed

Reputation: 11686

The only way it can be done is making an exit in program after placing a request in some task-scheduler to start it again

Upvotes: 0

Related Questions