How can I execute Application.Restart () on Windows Mobile 6?

I need to restart my Windows Mobile 6 application.

Here is the code I tried, but it just exits and doesn't restart the app.

public static void RestartApplication()
{
   var fileName = Assembly.GetExecutingAssembly().GetName().CodeBase;
   var startInfo = new ProcessStartInfo
   {
      FileName = fileName,
   };
   Process.Start(startInfo);
   Application.Exit();
}

      

Thank!

+2
windows-mobile compact-framework


source to share


2 answers


You can schedule the OS to start in 10 seconds.

CeRunAppAtTime

http://www.rhinomobile.net/2007/03/run-application-at-time-and-time-change.html



http://www.codeproject.com/KB/mobile/WiMoAutostart.aspx?display=PrintAll&fid=1505062&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2834502

http://windows-tech.info/10/d99ab8a56d1f4818.php

+2


source to share


I tried this code to work like a charm on Windows CE 6.

this.Close();
Process.Start(Assembly.GetExecutingAssembly().GetName().CodeBase, "");

      



It's hard to find an easy way to restart an application in Windows CE on the internet, so I post what I found. I hope this can help someone save some time.

0


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics