在C语言中有system函数
不知道在Delphi中对应着什么?
Winexec是不行的
没有直接调用的那种效果

解决方案 »

  1.   

    ShellExecute(application.MainForm.Handle,nil,pchar(fn),nil,nil,sw_shownormal);
      

  2.   

    program Project1;{$APPTYPE CONSOLE}uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, shellapi;begin
      ShellExecute(application.MainForm.Handle,nil,pchar('dir'),nil,nil,sw_shownormal);
      ReadLn;
    end.这样什么都看不到
    怕是语句出现了异常
    不知道是怎么回事
      

  3.   

    这一篇有没有参考价值
    http://topic.csdn.net/t/20000818/12/25708.html
      

  4.   

    是:
    pchar('cmd.exe/c dir'),