[DllImport("shell32.dll")]
static extern IntPtr ShellExecute(
IntPtr hwnd,
string lpOperation,
string lpFile,
string lpParameters,
string lpDirectory,
int nShowCmd);
None.
None.
Possible values for lpOperation
edit
explore
find
open
NULL - Performs the default action (prior to Win2k) normally open
// Asks default mail client to send an email to the specified address.
ShellExecute( IntPtr.Zero, "open", "mailto:support@microsoft.com", "", "", 0 );
// Asks default browser to visit the specified site.
ShellExecute( IntPtr.Zero, "open", "http://channel9.msdn.com", "", "", 0 );
// Opens default HTML editing app to allow for edit of specified file
ShellExecute( IntPtr.Zero, "edit", @"c:\file.html", "", "", 0 );
Do you know one? Please contribute it!