Autor Beitrag
spike0
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 77



BeitragVerfasst: So 26.06.05 12:51 
Wie kann ich andere Anwendungen mit meinem Programm steuern?
Ich weiß z.B., dass eine bestimmte Komponente in der anderen Anwendung vom Typ TEdit ist.
Wie kann ich jetzt da z.B. etwas reinschreiben?

Ich muss ja zuerst das Handle ermitteln:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
var H : THandle;
begin
  H := FindWindow(nil, 'Programm'); //Programm = Text in der Titelleiste der Anwendung
end;

Durch ein kleines Tool habe ich sogar das Handle von der TEdit Komponente herausgefunden.
Was muss ich jetzt machen, um da etwas reinzuschreiben?

Bin für jede Hilfe dankbar!

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: So 26.06.05 12:54 
1. findwindow
2. Suche in: Delphi-Forum, Delphi-Library ENUMCHILDWINDOWS (durch childs iterieren und nach der klasse TEdit suchen)
3. Suche in: Delphi-Forum, Delphi-Library WM_SETTEXT an das handle des TEdit schicken

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...