Autor Beitrag
Taktaky
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: Do 20.09.07 00:48 
Hallo,

beim, einblenden, ausblenden, posisionieren, ... eines fremdes Programm funktioniert
aber beim binden klappt bei mir nicht

hier ist der Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.Button13Click(Sender: TObject);
var
  wnd: THandle;
  btn: THandle;

begin
  wnd := FindWindow(nil, 'exe1');  // sucht das Fenster
  If btn <> 0 then
  //if (HTW <> 0) then SetWindowPos(HTW, 0, 0, 0, 300, 300, SWP_SHOWWINDOW);  //posisionieren
   ???   // zum binden, wie soll der Code sein
  else
  ShowMessage('keine gefunden');
end;


ich möchte das fremde Programm, wie so binden :
user defined image

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 20.09.07 10:04 
Taktaky Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: Do 20.09.07 10:59 
Halllo,

Nun habe ich das Problem gelöst aber nicht ganz. Das fremde Programm kann ich jetzt binden, bleibt aber beweglich
und so sieht der Code jetzt :
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.Button13Click(Sender: TObject);
var
  dhwnd: THandle;
begin
  dhwnd := FindWindow(nil, 'exe1');
  if dhwnd <> 0 then

    with Panel1 do

      Windows.SetParent(dhwnd, Handle); // exe1 wird gebunden aber bleibt beweglich
      

end;


Ich möchte auch den Titel von dem fremden Programm ausblenden


Gruß