Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    May 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Detect Keystroke from loop (VB 6.0)

    I've been racking my memory for while now. Can anyone remind me of the command in Visual Basic that allows the software to check for a keystroke whilst in a While - Loop.
    Thank-You

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Detect Keystroke from loop (VB 6.0)

    You could do the following:
    - Set the KeyPreview property of the form to True.
    - Set a global Boolean variable to Yes in the KeyPress (or KeyDown) event of the form.
    - Check the Boolean variable in your loop, and reset it to False for the next time.

  3. #3
    New Lounger
    Join Date
    May 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Detect Keystroke from loop (VB 6.0)

    Umm, I'm sure theres a specific command that tells the loop to break allowing the programme to check for changes IE option buttons salected etc. Its simple its one word and I can't remember it.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Detect Keystroke from loop (VB 6.0)

    I'm not sure I understand what you mean. What does Internet Explorer have to do with this?

    The DoEvents instruction allows external events to be processed.
    To get out of a Do ... Loop (which can be Do While ... Loop, or Do Until ... Loop, or Do ... Loop Until), you can use Exit Do.

  5. #5
    New Lounger
    Join Date
    May 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Detect Keystroke from loop (VB 6.0)

    Thats It Thank-You. Had one of those mental blocks.

Posting Permissions

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