Advertisement

05.10.2003 at 08:52AM PDT, ID: 20612205
[x]
Attachment Details

Main Form and New Form and Focus Problem

Asked by reddarin in Delphi Programming

Tags: form, focus

Hello everyone,

I created two programs and later decided to merge them into one program. That was no problem, I just included the second programs forms and files in the first programs project files through the IDE.

The problem is, when the second form is shown, it refuses to relinquish focus. That is, the second form is on top of the first form and if I click the first form's button in the task bar, it does not come to the front like it should.

Details:

I used setwindow to make the second form show in taskbar.
  SetWindowLong(self.Handle, GWL_EXSTYLE, WS_EX_APPWINDOW);
I've tried setting the parent to zero as well as not setting it at all (just going with default).
  //self.ParentWindow := 0;
Project Options correctly identifies the first form as the main form for the project.

reddarinStart Free Trial
[+][-]05.10.2003 at 03:01PM PDT, ID: 8501818

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2003 at 09:43PM PDT, ID: 8502731

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.11.2003 at 03:42AM PDT, ID: 8503412

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.11.2003 at 03:44AM PDT, ID: 8503416

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.11.2003 at 03:46AM PDT, ID: 8503424

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.11.2003 at 03:46AM PDT, ID: 8503426

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Delphi Programming
Tags: form, focus
Sign Up Now!
Solution Provided By: geobul
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.11.2003 at 08:02AM PDT, ID: 8504073

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.11.2003 at 08:07AM PDT, ID: 8504088

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.11.2003 at 08:16AM PDT, ID: 8504123

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32