473,661 Members | 2,429 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb2005 interrupt a loop?

19 New Member
I am trying to make it so i can press a key on the keyboard to exit an infinite loop. here is some of the code:

If bandw.Checked = True And infinite.Checke d = True Then
Do Until X = 117
BlackandWhite()

If (???) Then
GoTo endloop
End If

Loop

endloop:

the questionmarks represent the statement im looking for. how can i get it to recognize a key was pressed and act on it?
Apr 8 '07 #1
2 970
kenobewan
4,871 Recognized Expert Specialist
Have you tried e.key = key? Here is a post that may help:
How to trap "ctl + c" in key up event
Apr 8 '07 #2
thesayan
19 New Member
Have you tried e.key = key? Here is a post that may help:
How to trap "ctl + c" in key up event
im not sure i understand what you mean, could you show me an example maybe. and that reference was in c#, something i have 0 knowledge in
Apr 8 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2446
by: Marco | last post by:
Hallo, I have made a microcontroller with keyboard (16 key). I have a function to handle interrupt that comes from keyboard when a key is pressed. I should make a C software (not graphic) with a menu. I thought to make into main.c a cicle like this: while (1)
2
7063
by: bvermeersch | last post by:
Hi, Here I am again, just learning C# and always wanting to learn the hard things first. As you might already know from other posts I'm trying to convert c++ code to C#. The problem I'm running into now is the creation and handling of an interrupt. In c++ it is done this way:
6
12157
by: Const | last post by:
Hello, I wonder how i could interrupt the execution of a method. Like : My method can work on some lerg text file (severals Mb), and i would like to interrupt it by pressing "escape" tuch for exemaple. How ??
0
1023
by: Galen Somerville | last post by:
In VB6 (converted to VB2005) there are 6 different sub-menu items where the user has a choice of listing items on the screen or printing out a list of items. Each such menu item puts the name of a file in a string variable and calls a print routine. Obviously I have boucoup errors and warnings. But the documentation always shows doing the printing from a button click. I don't have a button to click !!
92
3295
by: =?Utf-8?B?bW9iaWxlbW9iaWxl?= | last post by:
I'm trying to load this structure for a call to DeviceIoControl: typedef struct _NDISUIO_QUERY_OID { NDIS_OID Oid; PTCHAR ptcDeviceName; UCHAR Data; } NDISUIO_QUERY_OID, *PNDISUIO_QUERY_OID; I created the equivalent in VB:
1
2510
by: =?Utf-8?B?TXJOb2JvZHk=?= | last post by:
I have a problem where I am sending a series of commands using P/Invoke's SendInput function which may last up to a minute long. I want to offer the user a way to break the commands by pressing the Pause/Break button. The problem I have is it seems that my SendInput commands are being quickly accepted and added to a buffer, because the only time my program ever processes the Pause/Break key press event is after my SendInput commands are...
6
1978
by: =?Utf-8?B?UmljaA==?= | last post by:
How to suppress the Outlook 2003 security prompts from VB2005. When I tried to look at the body of a message or any other part of an outlook mailItem -- I get these annoying security prompts. I have to loop through several emails a day. Is there some code for suppressing this? I saw some articles about a product called Outlook Redemption which supposed suppresses these messages. I have not tried it. Anyone know how to use it? ...
2
2791
by: John Fisher | last post by:
Hi Group, I have been absent a while, mainly because I have been getting better at figuring out my own Python problems. But not this one... I have a timed loop performing certain tasks until a total period of time has elapsed. I would like to be able to interrupt the loop or set various flags during execution via keyboard input. raw_input seems to just stop everything cold. I want the ability to just sacn the keyboard buffer and see...
6
5729
by: BlueBird | last post by:
Hi, I have a program with a master thread and several slave threads. Whenever an exception occurs, in the master thread or in one of the slave threads, I would like to interrupt all the threads and the main program. Threading API does not seem to provide a way to stop a thread, is there anyway to achieve that ? The closest thing I found is thread.interrupt_main() but it's far from
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2760
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.