Launching a simple media file

L

Luk Vloemans

Hey,

Does anybody know the syntax for launching an external file ? (C# &
Compact .Net Framework)

I'm writing some software for a GPS on a PDA and I want to show the user
a video file of a building when he passes it.

Thx in advance,

Luk Vloemans
IT student
 
L

Luk Vloemans

Peter said:
The simplest way would be to P/Invoke ShellExecuteEx and pass it your video
filename which will be opened in the associated program - probably Windows
Media Player unless you have installed a third party product.
http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=210
or you will find ready-made code for this function in the WinAPI library
http://www.opennetcf.org/winapi.asp

Peter

Hey Peter, thanks for your reply but isn't there any other method which
is easier? In the normal .NET framework, one would just use the
following lines of code:

Process myProcess = new Process();
myProcess.StartInfo.FileName = "\\helloworld.wmv";
myProcess.Start();

Isn't there a simular function in the Compact .NET framework?

Thanks for any help

Luk Vloemans
IT student
 
P

Peter Foot [MVP]

The .NET Compact Framework does not have the Process class unfortunately -
hence the need to rely on P/Invoking the native function. However we
(OpenNETCF.org) are looking of ways of making this easier with future
releases of our libraries.

Peter
 

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