Link to home
Start Free TrialLog in
Avatar of preetinagg
preetinagg

asked on

ShellExecute

Is there any pre-defined method which is equivalent of ShellExecute in VC++ or Shell in VB? Or an equivalent of CreateProcess? I want to open any file from inside C# code with application defined by file association. So a .doc file should be opened with Word.
ASKER CERTIFIED SOLUTION
Avatar of farsight
farsight

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of laghari78
laghari78

The above comment is comment but I just elaborate on this by providing the source. The points should be given to farsight :).

// C# Sample
using System;
using System.Diagnostics;

public class ShellExecuter
{
     public static void Main()
     {
          Process.Start("test.doc");
         
     }
}
Avatar of preetinagg

ASKER

Thanks ,
it worked.