如何在delphi中调用windows的写字板、计算器、画图?

解决方案 »

  1.   

    winexe(wordpad.exe);
    Winexe(calc.exe);
    winexe(mspaint.exe);
      

  2.   

    uses ShellAPIShellExecute(handle, 'open', 'calc.exe', nil, nil, sw_shownormal);//计算器ShellExecute(handle, 'open', 'wordpad.exe', nil, nil, sw_shownormal);//计算器ShellExecute(handle, 'open', 'mspaint.exe', nil, nil, sw_shownormal);//画图
      

  3.   

    uses ShellAPIShellExecute(handle, 'open', 'wordpad.exe', nil, nil, sw_shownormal);//写字板ShellExecute(handle, 'open', 'calc.exe', nil, nil, sw_shownormal);//计算器ShellExecute(handle, 'open', 'mspaint.exe', nil, nil, sw_shownormal);//画图
      

  4.   

    winexe('wordpad.exe', sw_shownormal);
    Winexe('calc.exe', sw_shownormal);
    winexe('mspaint.exe', sw_shownormal);
      

  5.   

    procedure TF_Main.N4Click(Sender: TObject);
    var SysPath:pchar;
    begin
      GetMem( SysPath, MAX_PATH+1 );
      GetSystemDirectory(SysPath, MAX_PATH+1);
      WinExec(pchar(SysPath+'\calc.exe'),sw_show);
      FreeMem(SysPath);
    end;