Results 1 to 3 of 3

Thread: Changing the sleep value through a form

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    107

    Changing the sleep value through a form

    I have the following in my code.

    Code:
    Public Declare Sub Sleep Lib "kernel32" (ByVal
    dwMilliseconds As Long)
    
    Sleep(1000)
    I have a frequent need to change the sleep value, sometimes to 5000, sometimes 100. Its a pain to always go into the source, and manually edit the number, recompile, and create the app.

    Is there a quick way of making this into a menu option in a form, so I can change this value on the fly, without having to go into the source each time?

    Thanks.

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: Changing the sleep value through a form

    I guess you could have an option like that example......
    In an option form or where ever you would like have a textbox and what ever the value is of the textbox then that is the sleep value.

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

    Re: Changing the sleep value through a form

    You could create a drop down menu with a variety of numbers on it so that the duration is selectable.

    I would set a default of whatever you feel would be the most commonly used, and populate the menu with other options.

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