Tremorblue
Programmer
I am using a component that talks via the serial port
I send a message then sit in a loop waiting for a response.
This is convenient as one function can fire a message and wait for the response. It doesnt work as the component does not get time to process incoming data. So I call Application->Processmessages(); the component then gets time to get the response.
The down side of this command is that instead of my application being locked for a second or two whilst data comes in, the users can click buttons and fire off other serial events leading to all sorts of reentrant problems.
I thought of bringing up a little modal busy form whilst the response was coming in to stop people pressing anything else. But when the form was up the stuff in the background locked up.
Any ideas appreciated.
/Regards
TBlue.
I send a message then sit in a loop waiting for a response.
This is convenient as one function can fire a message and wait for the response. It doesnt work as the component does not get time to process incoming data. So I call Application->Processmessages(); the component then gets time to get the response.
The down side of this command is that instead of my application being locked for a second or two whilst data comes in, the users can click buttons and fire off other serial events leading to all sorts of reentrant problems.
I thought of bringing up a little modal busy form whilst the response was coming in to stop people pressing anything else. But when the form was up the stuff in the background locked up.
Any ideas appreciated.
/Regards
TBlue.