在delphi中使用这个函数应该将哪个单元包含进来,怎么我编译老是出错??非常的急!!多谢了,先~~

解决方案 »

  1.   

    uses ShellAPI;HINSTANCE ShellExecute(    HWND hwnd, // handle to parent window
        LPCTSTR lpOperation, // pointer to string that specifies operation to perform
        LPCTSTR lpFile, // pointer to filename or folder name string
        LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters 
        LPCTSTR lpDirectory, // pointer to string that specifies default directory
        INT nShowCmd  // whether file is shown when opened
       );
      

  2.   

    ShellExecute(handle, "explore", path_to_folder, NULL, NULL, SW_SHOWNORMAL);
      

  3.   

    在uses中加入ShellAPI
    //发EMAIL
    shellexecute(handle,'open',pchar'mailto:[email protected]'),nil,nil,9);
    //打开网页
    ShellExecute(handle,'open','http://www.google.com','','', SW_SHOW );
    打开一个应用程序
    ShellExecute(handle,'open','calc.exe',null,null,SW_SHOW );
      

  4.   

    在uses中加入ShellAPI
    //发EMAIL
    shellexecute(handle,'open',pchar'mailto:[email protected]'),nil,nil,9);
    //打开网页
    ShellExecute(handle,'open','http://www.google.com','','', SW_SHOW );
    //打开一个应用程序
    ShellExecute(handle,'open','calc.exe',null,null,SW_SHOW );
    //默认应用程序打开一个文件
    ShellExecute(handle,'open','test.doc',null,null,SW_SHOW );
    //打开查找窗口,查找文件calc.exe
    ShellExecute(handle,'find','calc.exe',null,null,SW_SHOW );