Solved

Making a stop button stop the routine.

Posted on 2006-07-04
2
242 Views
Last Modified: 2010-04-16
Hi
I am using VC#.
On the main form I have a start button which calls a routine to start taking voltage measurments and displays the measured data. The full test can take several hours. I need to have another button on the form, STOP, to stop this routine at any stage.
I have tried adding a button but when the main routine starts the stop button has no affect, the code here never gets called.
How can I structure the program so that the buttons on the form still work.

David
0
Comment
Question by:davidw007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 500 total points
ID: 17035610
Hi davidw007,
----------

you could look into using threads for this because you could kill a worker thread on the main thread in your commandbutton code
http://msdn2.microsoft.com/en-us/library/7a2f3ay4.aspx

----------
bruintje
share what you know, learn what you don't
0
 

Author Comment

by:davidw007
ID: 17036049
Thanks that makes sense.
David
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question