Solved

How to detect a key pression inside a while loop

Posted on 1998-11-26
1
140 Views
Last Modified: 2010-04-04
Hi all..

I have a menu option that reads the 64K memory of a circuit connected to the serial port. When that option is chosen, a function that reads the memory is called. That function has a while loop that reads 4096 memory blocks at a time until it has read 64 K. The problem is that if I want to cancel the read operation, for example, by pressing F7, the program doesn't respond to keypresses. Is there in Delphi 3.0 something similar to Pascal ReadKey and Keypressed? or do you have any other suggestion? onKeyPress event of the form containing the menu doesn't work until the memory was completely read, that is, when the readmemory function finishes.

Thanks a lot for help in advance,
Jaime
0
Comment
Question by:skel
[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
1 Comment
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 total points
ID: 1348022
In the loop reading the memoery do this:

Application.ProcessMessages.

Cheers,

Raymond.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi - replicating a form 8 112
Run video youtube webbrowse 10 86
Convert a string into a TDateTime 5 80
How to make Sign in, using Clientdataset? 1 43
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…

738 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