Results 1 to 3 of 3

Thread: Run code until a control is clicked

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    321

    Run code until a control is clicked

    Hi

    I want to run a piece of code on the timer tick event until the user clicks 'button 1', is this possible? and how can i do this?

    Thanks

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Run code until a control is clicked

    Presumably the code you want to run is some form of loop?

    If so create a module (or global) level boolean variable, set it to false, then every time round the loop check that the variable is still false. In the button's click event set the variable to true.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Run code until a control is clicked

    Why not just set the timer's enabled property to false in the button click?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width