flins
asked on
Simultaneous execution of main and thread (containing a form) in Borland C++
Hi,
This seem like a tricky situation, but I'm not much of a Thread programmer. I have a Borland C++ program where the main form has an OnMessage handler that performs additional form navigation, mostly processing the ENTER key as TAB key. The main form creates a 2nd form that runs concurrently with the 1st form. Before the OnMessage function I could click either form and get control in that form. After the OnMessage handler was written I was locked on one form.
I got the bright idea of executing the 2nd form in a thread. Execution is fine, but the 2nd form never appears since, once again, I'm assuming the main form never gives up control. What I need is to be able to have the main form create the 2nd form and gain control of either by simply clicking one or the other of the forms. A Thread solution or a non-Thread solution is fine with me.
Any ideas?
Pat
This seem like a tricky situation, but I'm not much of a Thread programmer. I have a Borland C++ program where the main form has an OnMessage handler that performs additional form navigation, mostly processing the ENTER key as TAB key. The main form creates a 2nd form that runs concurrently with the 1st form. Before the OnMessage function I could click either form and get control in that form. After the OnMessage handler was written I was locked on one form.
I got the bright idea of executing the 2nd form in a thread. Execution is fine, but the 2nd form never appears since, once again, I'm assuming the main form never gives up control. What I need is to be able to have the main form create the 2nd form and gain control of either by simply clicking one or the other of the forms. A Thread solution or a non-Thread solution is fine with me.
Any ideas?
Pat
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This works great and without a thread Also, very quick to respond.
Thanks,
Pat
Thanks,
Pat
Hi flins,
The Borland C++ zone is Programming / C / IDEs / C++ Builder.
Kent
The Borland C++ zone is Programming / C / IDEs / C++ Builder.
Kent
ASKER
Great! I'll log that zone in my notes since most of my questions will most likely fall under that category.
Thanks
Pat
Thanks
Pat
ASKER
I'm going to try that before accepting.
I can't find Borland IDE in the zones? Where exactly is that? I must be going blind. You're not the
first to correct me on that.
Pat