WindowsAPI - shellexecute

shellexecute(application.Handle,'open',PChar(runpath),nil,nil,SW_SHOWNORMAL);
 
比如我要打开c:\111.doc
你可以这样写
uses
  shellapi

ShellExecute(handle, 'open','winword.exe', '111.doc', 'c:\', SW_SHOWNORMAL);
ShellExecute(handle, 'open','winword.exe', 'c:\111.doc', nil, SW_SHOWNORMAL);

或者干脆
ShellExecute(handle, 'open','c:\111.doc', nil, nil, SW_SHOWNORMAL);

你可能感兴趣的:(C++,c,C#)