Automatic start for a C# mobile application.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top