比如我要打开windows带的计算器,写字板,我可以将这种程序复制到我的目录下。
用什么命令执行这些程序。
请告知。呵呵。这问题比较菜。但比较急,50分奉送。

解决方案 »

  1.   

    比较简单的有:INT WinExec(    LPCSTR lpCmdLine, // address of command line 
        UINT uCmdShow  // window style for new application 
       );WinExec('c:\windows\explorer.exe', sw_show);
      

  2.   

    UINT WinExec(    LPCSTR lpCmdLine, // address of command line 
        UINT uCmdShow  // window style for new application 
       );
      

  3.   

    uCmdShow的参数有SW_HIDE          
    SW_MAXIMIZE
    SW_MINIMIZE                   
    SW_RESTORE                                                       
    SW_SHOW                            SW_SHOWDEFAULT                                        
    SW_SHOWMAXIMIZED
    SW_SHOWMINIMIZED
    SW_SHOWMINNOACTIVE
    SW_SHOWNA Displays 
    SW_SHOWNOACTIVATE
    SW_SHOWNORMAL
      

  4.   

    执行程序外文件
    WINEXEC//调用可执行文件
    winexec('command.com /c copy *.* c:\',SW_Normal);
    winexec('start abc.txt');
    ShellExecute或ShellExecuteEx//启动文件关联程序
    function executefile(const filename,params,defaultDir:string;showCmd:integer):THandle;
    ExecuteFile('C:\abc\a.txt','x.abc','c:\abc\',0);
    ExecuteFile('http://tingweb.yeah.net','','',0);
    ExecuteFile('mailto:[email protected]','','',0);
      

  5.   

    WinExec 或
    Uses ShellAPI;
    ShellExecute
    具体可以查看Win32 SDK的Help
      

  6.   

    WinExec 或
    Uses ShellAPI;
    ShellExecute
      

  7.   

    你可以用一个叫winexec()的函数。
      

  8.   

    谢谢各位。CSDN真是太好了。呵呵。资料库,结帐。