Hallo,
Ich muß mit einem Button (Gui2) einen Button von (Gui1) starten!
...Bilder sagen mehr als 1000 Worte!
Meine Gui1
[autoit]
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Main = GUICreate("Form1", 615, 440, 261, 142)
$Info = GUICtrlCreateButton("Info", 52, 52, 75, 25)
$Code = GUICtrlCreateButton("Code", 52, 92, 75, 25)
;GUICtrlSetState(-1, $GUI_HIDE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Info
#include "Suche.au3"
Case $Code
;$info= GUICtrlRead($Input1)
Msgbox(4,"Die Info von Input",$Info)
EndSwitch
WEnd
Meine Gui2
[autoit]
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ### Form=
$FormSuche = GUICreate("Suche", 163, 99, 192, 124, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
$Input1 = GUICtrlCreateInput("Input1", 24, 8, 121, 21)
$Button1 = GUICtrlCreateButton("Starte Code", 40, 40, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$info= GUICtrlRead($Input1)
MsgBox(4,"MainFokus",$info)
;GUISetState($Main)
;MsgBox(4,"MainFokus","Button Code")
EndSwitch
WEnd
Also, nach dem Klick der Gui2 soll die Gui 1 den Fokus erhalten.
Der CodeButton der gui 1 ist später nicht sichtbar.
Ich habe alles mögliche schon probiert... ![]()
Viele Grüße
Ilse ![]()