Solved

How to detect a key pression inside a while loop

Posted on 1998-11-26
1
138 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
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Syntax Check Delphi Seattle IOS app without MAC ? 1 97
How to define IfThen functions in one common unit? 4 53
Performance of SQL statement 37 111
update joined tables 2 46
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

773 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