How to detect a key pression inside a while loop
Posted on 1998-11-26
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,