- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi 拖动文件到exe 打开 获取getcommandline命令行
delphi 拖动文件到exe 打开 获取getcommandline命令行
var
str:string;
path:string;
fpath:string;
begin
path:= '"'+Application.ExeName+'"'+' ' ;
edit1.Text:= path;
str:= getcommandline ;
fpath:= StringReplace ( str, path, '', []) ;
fpath:= StringReplace ( fpath, '"', '', [rfReplaceAll]) ;
Memo1.Text:=str;
Memo2.Text:=fpath;
或者
if ParamCount >= 1 then
begin
Memo2.Text:= ParamStr(1)
end;
本文链接:https://blog.csdn.net/ozhy111/article/details/82386053