var hInstance:LongInt; begin hInstance:=ShellExecute(0,'open','notepad.exe',nil,nil,SW_SHOW); if Hi<=32 then begin ShowMessage('Error'); end; end;
if hInstance<=32 then begin ShowMessage('Error'); end;
var AppInst,AppWind: THandle; Text: Array[0..255] of char; begin AppInst:= ShellExecute(Handle, 'open', 'notepad.exe', nil, '', SW_NORMAL); EnumWindows(@EnumFunc, longint(self)); AppWind:= GetWindow(AppWind, GW_CHILD); // AppInst 就是返回值了 end;
procedure TForm1.Button1Click(Sender: TObject); var temp:Longint; begin temp:=shellexecute(handle,'open',pchar('notepad.exe'),nil,nil,sw_show); showmessage(inttostr(temp)); end;
Thand是什么类型, 不行啊
procedure TForm1.Button1Click(Sender: TObject); var temp:Longint; begin temp:=shellexecute(handle,'open',pchar('notepad.exe'),nil,nil,sw_hide); showmessage(inttostr(temp)); end;
hInstance:LongInt;
begin
hInstance:=ShellExecute(0,'open','notepad.exe',nil,nil,SW_SHOW);
if Hi<=32 then
begin
ShowMessage('Error');
end;
end;
begin
ShowMessage('Error');
end;
Text: Array[0..255] of char;
begin
AppInst:= ShellExecute(Handle, 'open', 'notepad.exe', nil, '', SW_NORMAL);
EnumWindows(@EnumFunc, longint(self));
AppWind:= GetWindow(AppWind, GW_CHILD);
// AppInst 就是返回值了
end;
var
temp:Longint;
begin
temp:=shellexecute(handle,'open',pchar('notepad.exe'),nil,nil,sw_show);
showmessage(inttostr(temp));
end;
不行啊
var
temp:Longint;
begin
temp:=shellexecute(handle,'open',pchar('notepad.exe'),nil,nil,sw_hide);
showmessage(inttostr(temp));
end;
在system单元中