Reputation: 62544
How to reset my program (close.. and Open again)
in C# windows-mobile ?
Upvotes: 0
Views: 1101
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
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
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
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