Jump to content

Recommended Posts

Posted

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
EndFunc

but i want see result in GUI window

How to do that ??

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...