Kod:
Program içinde baska program acma
procedure TForm1.Button1Click(Sender: TObject);
var
hNotePad, Style: Cardinal;
begin
// button click event
hNotePad := FindWindow(nil, 'Adsız - Not Defteri');
if hNotePad = 0 then
begin
ShowMessage('NotePad Çalışmıyor');
Exit;
end;
ShowWindow(hNotePad, SW_HIDE);
Style := GetWindowLong(hNotePad, GWL_STYLE);
if Style = 0 then
begin
ShowMessage('Sistem Stil verisine ulaşamadı');
Exit;
end;
Style := Style or WS_CHILD; // to be attatched to another window I think u need a ws_child
SetWindowLong(hNotePad, GWL_STYLE, Style);
windows.SetParent(hNotePad, Handle);
MoveWindow(hNotePad, 2,2, Width-10, Height - 56, True);
ShowWindow(hNotePad, SW_SHOW);
end;