Delphi 怎么样调出系统运行对话框,

来源:百度知道 编辑:UC知道 时间:2024/06/30 20:17:02
调运行声明
该函数在Shell32.dll中,是个无名字的函数,调用时要用索引来调用,为 index 60, 在VB中我会,我刚从VB转过来的,对这方面不是很清楚,请高手指定,谢谢,它共有6个参数,不知道是不是像下面这样声明,
Function SHRunFileDlg(hOwner,hIcon:Integer;lpstrDirectory,szTitle,szPrompt:pchar;uFlags:Integer):Integer;external'shell32.dll'index 61;
index 61.上面打错了,不过声明时没有错,就是不知道如何调用,请教

123avc123,我试过了,没有用的,如果禁用了就打不开的,我说的是用API打开,这个没有用的,不过仍要谢谢您!

就是调用系统开始菜单菜里面那个运行框吗?
先要uses ComObj
procedure TForm1.Button1Click(Sender: TObject);
var
ShellApplication: Variant;
begin
ShellApplication := CreateOleObject('Shell.Application');
ShellApplication.FileRun;
end;

一定要用API方式打开?那代码比较多,我不发到这来了。放到网上,你自己下来看吧。
http://www.elishar.com/ruanjian/run.rar