Program İçinde Baska Program Acma

'Programlama' forumunda ...... tarafından 6 Ağu 2009 tarihinde açılan konu

Konu etiketleri:
  1. ......

    ...... Misafir

    Program içinde baska program acma ..


    Kod:
    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;
    
     

Bu Sayfayı Paylaş