Sign in to follow this  
Followers 0
BJJ

Show result on GUI

3 posts in this topic

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 ??

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

Oh thanks that look greate

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0