Autor Beitrag
Phanuel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36

Win XP Pro, Mandrake linux 10.0

BeitragVerfasst: So 08.05.05 21:34 
Also zur Fragestellung:
Ich habe ein Programm sagen wir mit einem Button, und ein anderes mit einem Label, und ich will jetzt das sich durch klicken des Buttons auf dem einem Programm das Label des anderen Programm irgendwie ändernt.

Irgendwelche Tutorials, Befehle, oder sonst irgendwas vll. auch nen Namen wie man sowas nennt?
Vielen Dank
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: So 08.05.05 21:50 
1. FindWindow (-handle) vom anderen Programm
2. FindChildWindow (-handle) vom Label
3. Label-caption setzen. Wenn es ein WinControl ist, gehts. Glaube ich.

oder

Wenn das zweite Programm auch von Dir ist, schick dem 2.Programm eine Message.
Prog1: PostMessage (HandleVonProgramm2,WM_LABELAENDERN,0,0)

Prog2:
Const WM_LABELAENDERN = WM_USER;
TMainForm = Class (TForm)
...
Procedure cmLabelAendern (Var M : TMessage); Message WM_LABELAENDERN;
...

Und wenn Du dann noch von Prog1 and Prog2 einen String übermitteln willst, dann schau mal unter WM_COPYMSG (oder so) oder Shared Memory nach.
Phanuel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36

Win XP Pro, Mandrake linux 10.0

BeitragVerfasst: Mo 09.05.05 12:30 
Wie finde ich den handle von dem Programm den raus,
hab mich mal erkundigt und ich könnte es über die Titelleiste "rausfischen".
Das Programm heisst bla.
Ausserdem sagt der mir im sender programm das wm_labelaendern undefiniert sei.
Phanuel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36

Win XP Pro, Mandrake linux 10.0

BeitragVerfasst: Mo 09.05.05 17:17 
Ok ich machs mit findwindow.
funktioniert jetzt danke.