BJJ Posted May 29, 2009 Posted May 29, 2009 Hmm..In my Calculator we can see resoult in a MsgBox (popup) Part of code Func _Start () MsgBox ('0','Crimson V1.0','Kazda kulka powinna miec ' & _Result () & ' sily ', '0') EndFunc Func _Result () $sila1 = GUICtrlRead($sila) $defens1 = GUICtrlRead($defens) $kukly1 = GUICtrlRead($kukly) $srednia = (($sila1 + $defens1) /2) $wynik = ($srednia / $kukly1) Return $wynik EndFuncbut i want see result in GUI window How to do that ??
stampy Posted May 29, 2009 Posted May 29, 2009 Add a label (or other control) and set data in the button function. $lblResult = GUICtrlCreateLabel("", 56, 100, 140, 25);<<<<<<<<<<<<<< Func _Start () ;MsgBox ('0','Crimson V1.0','Kazda kulka powinna miec ' & _Result () & ' sily ', '0') GUICtrlSetData($lblResult,_Result());<<<<<<<<<<<<<< EndFunc Func _Result () $sila1 = GUICtrlRead($sila) $defens1 = GUICtrlRead($defens) $kukly1 = GUICtrlRead($kukly) $srednia = (($sila1 + $defens1) /2) $wynik = ($srednia / $kukly1) Return $wynik EndFunc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now