Sign in to follow this  
Followers 0
rliiack

Menu Opened for a second then closed

3 posts in this topic

This is my code:

#include <GUIConstantsEx.au3>     
menuCreator()  
Func menuCreator() 
Local $slider  
GUICreate("Smart Icons",200, 500, 100, 100) 
GUISetBkColor(0x00E0FFFF) 
$slider = GUICtrlCreateSlider(50, 20, 100, 10) 
GUICtrlSetLimit($slider,100,0) 
GUISetState(@SW_SHOW) 
GUICtrlSetData($slider, 45)  
EndFunc

How come my menu opened for one second then closed? Am I missing some code?

Thanks


My Projects:Smart Icons

Share this post


Link to post
Share on other sites



You need to include a loop. The problem is that the script finishes and exits just after you create it.

#include <GUIConstantsEx.au3>


menuCreator()

While 1
   If GUIGetMsg () = -3 Then ExitLoop
WEnd


Func menuCreator()
   Local $slider
   GUICreate("Smart Icons",200, 500, 100, 100)
   GUISetBkColor(0x00E0FFFF)
   $slider = GUICtrlCreateSlider(50, 20, 100, 20)
   GUICtrlSetLimit($slider,100,0)
   GUISetState(@SW_SHOW)
   GUICtrlSetData($slider, 45)
EndFunc

Mat

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