djonur007 Posted August 19, 2010 Share Posted August 19, 2010 Selamun Aleykum arkadaşlar; Benim Guidelete komutunda bir sorum var. Kodlar aşağıda. Şimdi "aç" butonuna bastığımızda form2 açılıyor. "kapat" butonuna bastığımızda kapanıyor. hata ise burda kapata tıkladıktan sonra tekrar aç butonuna basınca açılmıyor? #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form = GUICreate("", 405, 294, 100, 218) $Tikla1 = GUICtrlCreateButton("Aç", 128, 128, 153, 49, $WS_GROUP) GUISetState(@SW_SHOW) $Form2 = GUICreate("", 405, 294, 302, 218) $Tikla2 = GUICtrlCreateButton("Kapat", 128, 128, 153, 49, $WS_GROUP) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Tikla1 _tikla1() Case $Tikla2 _tikla2() EndSwitch WEnd Func _tikla1() GUISetState(@SW_SHOW, $Form2) Endfunc Func _tikla2() GUIDelete($Form2) Endfunc Bu sorun nasıl çözülür? Link to comment Share on other sites More sharing options...
blue_life Posted August 19, 2010 Share Posted August 19, 2010 Basit bir şekilde aşağıdaki gibi olabilir; Global $Form = GUICreate("", 405, 294, 100, 218) $Tikla1 = GUICtrlCreateButton("Aç", 128, 128, 153, 49) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $Tikla1 _tikla1() EndSwitch WEnd Func _tikla1() GUISetState(@SW_DISABLE,$Form) Local $Form2 = GUICreate("", 405, 294, 302, 218) Local $Tikla2 = GUICtrlCreateButton("Kapat", 128, 128, 153, 49) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 ExitLoop Case $Tikla2 ExitLoop EndSwitch WEnd GUIDelete($Form2) GUISetState(@SW_ENABLE,$Form) GUISetState(@SW_RESTORE,$Form) EndFunc ;==>_tikla1 Kolay gelsin... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.