Console Application中DOS命令调用的问题

要追问请引用回复 2006-10-23 10:49:58
在C语言中有system函数
不知道在Delphi中对应着什么?
Winexec是不行的
没有直接调用的那种效果
...全文
134 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ly_liuyang 2006-10-25
  • 打赏
  • 举报
回复
是:
pchar('cmd.exe/c dir'),
zczb 2006-10-25
  • 打赏
  • 举报
回复
这一篇有没有参考价值
http://topic.csdn.net/t/20000818/12/25708.html
  • 打赏
  • 举报
回复
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.

这样什么都看不到
怕是语句出现了异常
不知道是怎么回事
zczb 2006-10-24
  • 打赏
  • 举报
回复
ShellExecute(application.MainForm.Handle,nil,pchar(fn),nil,nil,sw_shownormal);

16,749

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧