var
  hd:Thand;
begin
  hd:=shellexecute(...
end;

解决方案 »

  1.   

    var
    hInstance:LongInt;
    begin
        hInstance:=ShellExecute(0,'open','notepad.exe',nil,nil,SW_SHOW);
        if Hi<=32 then
            begin
            ShowMessage('Error');
            end;
    end;
      

  2.   

    if hInstance<=32 then
            begin
            ShowMessage('Error');
            end;
      

  3.   

    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;
      

  4.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
      temp:Longint;
    begin
        temp:=shellexecute(handle,'open',pchar('notepad.exe'),nil,nil,sw_show);
        showmessage(inttostr(temp));
      end;
      

  5.   

    Thand是什么类型,
    不行啊
      

  6.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
      temp:Longint;
    begin
        temp:=shellexecute(handle,'open',pchar('notepad.exe'),nil,nil,sw_hide);
        showmessage(inttostr(temp));
      end;
      

  7.   

    THandle = LongWord;
    在system单元中