Inbuilt Functionality to Open any file with its assocaited Application in pocket PC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gurtejgenius
    New Member
    • Sep 2008
    • 1

    Inbuilt Functionality to Open any file with its assocaited Application in pocket PC

    Hi,
    Is there and Inbuilt Functionality or API that I can use to Open any file with its assocaited Application in pocket PC or WIN Mobile (in C#.NET).
    For ex:
    1. If there is Image file(JPG or BMP), if user clicks it, It automaticaly opens up In Image\Picture Viewer.
    2. If there is Word(*.doc), if user clicks it It automaticaly opens up In Word applcaition, same is the case with Excel(*.xls) and so on.

    If there is any API(Inbuilt functionality) that I can use or DO I need to write my own code to invoke the relevant Executable assocaited with a particular application and how to do it.

    Regards,
    Gurtej
  • markmcgookin
    Recognized Expert Contributor
    • Dec 2006
    • 648

    #2
    Hi there,

    I think this is what you are looking for:

    Code:
    string cabFile = @"Program Files\MyApp\myFileName.jpg";
    Process opener = new Process();
    opener.StartInfo.FileName = cabFile;
    opener.StartInfo.Verb = "Open";
    opener.StartInfo.UseShellExecute = true;
    opener.Start();
    Hope this helps,

    Mark

    Comment

    Working...