473,395 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Interrupting a Loop in C#

I have a simple incrementing loop, which if a button is clicked I want the loop to stop completely.

The loop is in its own simple method. And when a button is clicked I want this loop to terminate.

Does this require creating event handlers and such??
Oct 15 '06 #1
0 1144

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

Similar topics

2
by: J. W. McCall | last post by:
I'm working on a MUD server and I have a thread that gets keyboard input so that you can enter commands from the command line while it's in its main server loop. Everything works fine except that...
1
by: stephan | last post by:
Hi, Im am using PyRun_SimpleString() inside a BCB 5.0 GUI app on win32. All works fine. The PyRun_SimpleStript() runs a piece of python code which calls often a callback function to...
1
by: William | last post by:
For the following code snippet: for ( ;; ) { numFDInSet = select( fdmax+1, &readfds, NULL, NULL, &tv ); // ... signal( SIGALRM, alarm_handler ); // ...
4
by: Sam Sungshik Kong | last post by:
Hello! I have a form with 2 buttons. If you click button1, it runs a loop which changes the form's text from 0 to 99. I added Sleep(500) to make it slow. If you click button2 while the above...
6
by: Frank | last post by:
I have made an application that loads data through an OleDbDatareader. I would like the user to be able to interupt the load. Now, I could of course include an interrupt button in the form....
1
by: John Savage | last post by:
I'm finding that many times when I inadvertently code an endless loop in pythonD code, on MSDOS, execution cannot be interrupted by ctrl-C and I am forced to reboot and this is rapidly loses its...
8
by: andreas | last post by:
When I do a long calculation is there a possibility to interrupt this calculation properly? For i as integer = 1 to 100000000 do something next and retrieve the i at the moment of the...
0
by: johan2sson | last post by:
I have embedded a python console in a plugin to a Windows application. I do not control the application, but the plugin is mine. Since the application is not thread-safe, I am push()-ing each line...
13
by: michael sorens | last post by:
I have a lengthy sequence of operations that are executed and reported on in a status window in a Windows Form application. Some work is done by background threads but other work is not. I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.