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

解决方案 »

  1.   

    ShellExecute 已经很简单了的;;虽然它是win api 
    但delphi已经把所有的api 都已封装好了;用不着你再写声明;直接调用即可
    shellexcute(0,'open','filename',nil,nil,SW_SHOWNORMA)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
       );
     hwnd Long,指定一个窗口的句柄,有时候,windows程序有必要在创建自己的主窗口前显示一个消息框 
    lpOperation String,指定字串“open”来打开lpFlie文档,或指定“Print”来打印它 
    lpFile String,想用关联程序打印或打开一个程序名或文件名 
    lpParameters String,如lpszFlie是可执行文件,则这个字串包含传递给执行程序的参数 
    lpDirectory String,想使用的完整路径 
    nShowCmd Long,定义了如何显示启动程序的常数值。参考ShowWindow函数的nCmdShow参数 
      

  2.   

    不用API行吗?
    ShellExecute,ShellExecuteEx,WinExec,CreateProcess都是API,
    就算是做一个批处理文件,要运行这个批处理还是要用上述API。
      

  3.   

    不用API?那用什么?难道用汇编?使用中断调用?
      

  4.   

    那用控件罗。用lmd tools 5.0里的一个控件。不过人家控件的源代码里也是用API才实现这个功能的。
      

  5.   

    老兄,你要知道所有的windows程序在最底层都是通过系统api实现的,编程语言不过是对api进行了封装而已。不用api?->mission imporsible!