Automatic start for a C# mobile application.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.
We have an Intermec device with Windows mobile 2003 and we made a .NET C#
application wiht the Compact Framework.
Question:
I need to start automatically a file.exe installed on the device (with the
CAB file).
I used this code C#
----------------------------------------------------------------------------------------
[DllImport("coredll.dll", EntryPoint="SHCreateShortcut",SetLastError=true) ]
public static extern bool SHCreateShortcut(string shortcut, string target);

SHCreateShortcut(@"\Windows\StartUp\" +
Path.GetFileNameWithoutExtension(applicationPath) + ".lnk", "\"" +
applicationPath + "\"")
----------------------------------------------------------------------------------------
If I use this code, the application start only if I restart the pocket PC
device (warmboot or coldboot or soft reset).
But I'd like to start the application when I press the button on/off (I/O)
on the device. What can I do to start the application also if I only press
the on/off
button on the device?

Thanks a lot.
 
Back
Top