Starting a program from VB .net on Win ce?

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

Guest

Hello!

I've got a little problem:
as i read in the MSDN libary, Vb .net for "inteligent devices" does not support the "SHELL" function to start an application.

Is there an alternative function? Thank you very much....
I've got the microsoft reference handbook, but there is nothing about win ce


thank you very much!
 
Hello!

Thank you for your answer! I'm using VB .net and tried to use that functions but it don't work...
Is there no VB .net function to start an application on Windows ce .net?? I won't believe that.....

thanks!

patric
 
what are you trying to do, start it automatically each
time whenswitched on? if so write an autorun batch
executable.
 
I've got an application which copy a powerpoint presentation from an USB stick to the local drive.
after that I want to run the powerpoint viewer...
I want to start this:
"presviewer.exe mypres.ppt"

"SHELL" isn't supported by ce .net


thanks, patric
 
Hi,

Due to size constraints .NET Compact framework has limited number of classes
than its desktop counterpart. To start another application u can use either
CreateProcess() or ShellExecute() API. Both functions are included in the
opennetcf WIN32 wrapper classes which works both in vb.net and c#.

http://www.opennetcf.org/docs/WinAPI/OpenNETCF.WinAPI.Core.CreateProcess.html
http://www.opennetcf.org/docs/WinAPI/OpenNETCF.WinAPI.Core.ShellExecute.html

If u r getting errors while using those functions, can u give me the error
message?

Hope this helps...

Girish.
 
Hello

okay, I want to try this WinAPI but sorry for that stupid question but how can I include this DLL into my VB .net project

thank you!

patric
 
no :-(

MissingMethodException in Application::Run+0x1a
frmmain::Main+0xa

Function:

private sub startviewer()
opennetcf.winapi.core.shellexecute("\windows\presviewer.exe" , "mypres.ppt")
end sub
 
Are you adding a reference to this dll in the GUI and also adding the DLL to
your project (copy the winapi.dll into your project folder, and include it
as an existing item, and ensure it is set to content). This will copy it to
the target folder on deployment with the other files.
 
Back
Top