Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Interrupting A Do Loop. ...
Author:
Mike G
E-mail:
Click to e-mail author
Website:
http://www.ivbnet.com
Submitted:
10/1/2001
Version:
VB5
Compatibility:
VB5
Category:
Miscellaneous
Views:
8477
Interrupting A Do Loop.
Declarations:
'none
Code:
Option Explicit ' ------------------------------------------------------------ ' Copyright ©2001 Mike G --> IvbNET.COM ' All Rights Reserved, http://www.ivbnet.com ' EMAIL : webmaster@ivbnet.com ' ------------------------------------------------------------ ' You are free to use this code within your own applications, ' but you are forbidden from selling or distributing this ' source code without prior written consent. ' ------------------------------------------------------------ Private Declare Function GetAsyncKeyState Lib "user32" _ (ByVal vKey As Long) As Integer '//ESCAPE Const VK_ESCAPE = &H1B '//Button Click Const VK_LBUTTON = &H1 '//Interrupting A Do Loop '//Give user ability to interrupt loop Private Sub cmdStart_Click() Do If GetAsyncKeyState(VK_ESCAPE) < 0 Or _ GetAsyncKeyState(VK_LBUTTON) < 0 Then Debug.Print "-------> EXIT <-------" Exit Do End If Debug.Print "______ LOOPING ___________" Loop End Sub Private Sub cmdExit_Click() Unload Me End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement