Jump to content

Exit


Aqil990

Recommended Posts

Selamu aleykum,

Bir sorunum var ben bir prograam yaziyorum programin icinde 3 form var hepsini koda ile yapdim ama birinci form ana, ikinci ve ucuncu form ise elakeli buttonlara basildiqda aciliyor . Problem shu

Case $GUI_Event_Close

Exit

ikinci ve ucuncu formlarda Close ni vurdugda tum pencereleri baghliyor ben istiyorumki ikinci ve ucuncude closeni vurdukda hemin formlar baghlansin birinci form kalsin, nasil yapa bilirim?

Klubdan yazdigim icin kodlari koyamadim umarim anlata bilmisimdir.

Simdiden tesekkurler yapiyorum

Link to comment
Share on other sites

@Aqil990

Ben basit bir örnek yazım,sen kendine göre ayarlarsın...

_AnaForm()

Func _AnaForm()
	$Form1 = GUICreate("Form1", 400, 400)
	$Button1 = GUICtrlCreateButton("Button1", 16, 160, 75, 25)
	$Button2 = GUICtrlCreateButton("Button2", 128, 160, 75, 25)
	GUISetState(@SW_SHOW)
	While 1
		$nMsg = GUIGetMsg()
		Switch $nMsg
			Case -3
				Exit

			Case $Button1
				_Form2($Form1)
			Case $Button2
				_Form3($Form1)
		EndSwitch
	WEnd
EndFunc

Func _Form2($Hwnd)
	GUISetState(@SW_DISABLE,$Hwnd)
	$Form1 = GUICreate("Form2", 264, 216, -1,-1,-1,-1,$Hwnd)
	GUISetState(@SW_SHOW)
	While 1
		$nMsg = GUIGetMsg()
		Switch $nMsg
			Case -3
				ExitLoop

		EndSwitch
	WEnd
	GUISetState(@SW_ENABLE,$Hwnd)
	GUIDelete($Form1)
EndFunc

Func _Form3($Hwnd)
	GUISetState(@SW_DISABLE,$Hwnd)
	$Form1 = GUICreate("Form3", 264, 216, -1,-1,-1,-1,$Hwnd)
	GUISetState(@SW_SHOW)
	While 1
		$nMsg = GUIGetMsg()
		Switch $nMsg
			Case -3
				ExitLoop

		EndSwitch
	WEnd
	GUISetState(@SW_ENABLE,$Hwnd)
	GUIDelete($Form1)
EndFunc

Link to comment
Share on other sites

@blue_life

Usta kod ishliyorda boyle hata veriyor.

Simdi $Form1 = GUICreate("Form2", 264, 216, -1,-1,-1,-1,$Hwnd) Boyle yaratirkan formu aciliyor amma bir defa, ben listviewle elakelendiriyorum , bir defa acildikdan sonra baghliyorsun daha acilmiyor.

$Form1 = GUICreate("Form2", 264, 216,$Hwnd) Boyle yaratirkan ise her defasinda aciliyor amma her defasinda ayri ayri parametrede aciliyor :S shashdim kaldim :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...