How to shell to another app and have it appear in a delphi form

All error checking omitted, but this should get you started: procedure TForm1.Button1Click(Sender: TObject); var Rec: TShellExecuteInfo; const AVerb = ‘open’; AParams=””; AFileName=”Notepad.exe”; ADir=””; begin FillChar(Rec, SizeOf(Rec), #0); Rec.cbSize := SizeOf(Rec); Rec.fMask := SEE_MASK_NOCLOSEPROCESS; Rec.lpVerb := PChar( AVerb ); Rec.lpFile := PChar( AfileName ); Rec.lpParameters := PChar( AParams ); Rec.lpDirectory := PChar( Adir ); Rec.nShow := … Read more