• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

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
0
flins
Asked:
flins
  • 3
  • 2
1 Solution
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi flins,

You'll need to call one of the form's show methods (ShowModal, etc.) to display the form.


This looks to be a predominantly Borland IDE question so I'm going to add that zone to the question.

Kent
0
 
flinsAuthor Commented:
Kdo,

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
0
 
flinsAuthor Commented:
This works great and without a thread Also, very quick to respond.

Thanks,
Pat
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi flins,

The Borland C++ zone is Programming / C / IDEs / C++ Builder.


Kent
0
 
flinsAuthor Commented:
Great! I'll log that zone in my notes since most of my questions will most likely fall under that category.

Thanks

Pat
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now