Jump to content

Recommended Posts

Posted
$gui = GUICreate("Start & Stop",150,250)
$btn1 = GUICtrlCreateButton("Start",60,100,50,25)
$btnExit = GUICtrlCreateButton("Exit",5,100,50,25)
$label = GUICtrlCreateLabel("",10,10,100,30)
GUISetState(@SW_SHOW)

While 1
   $Read = GUICtrlRead($btn1)
   $msg = GUIGetMsg()
   switch $msg
   Case $btnExit
      Exit
   Case $btn1
      if $Read = "Start" Then
      GUICtrlSetData($label,"Go")
       GUICtrlSetData($btn1,"Stop")
    ElseIf $Read = "Stop" Then
        GUICtrlSetData($label,"Stop")
       GUICtrlSetData($btn1,"Start")
       EndIf
   Case -3
      Exit
   EndSwitch
   WEnd

An example for your help bro...

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...