473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

MDI Child Form problem

Hi,

I have produced a MDI application in C#. And basically i produce a
child form from the container and then i produce another child from
that child.

I do this by (code in child frmCustomers)
frmCustomerSummary = new frmMatchSummary(....);
frmCustomerSummary.MDIParent = this.MDIParent;
frmCustomerSummary.Show();

This all works fine and the form is displayed as a MDI child But It's
not in focus, the title bar is not selected, although it is at the top
of the other forms. The frmCustomers that produced the child form is
selected, the only way to gain focus is click off and then back on
again.

I have tried .activate(), and it still doesn't still work.

What am i doing wrong?

Kalv
Nov 15 '05 #1
2 2229
Check frmCustomers(Summary) if any of its TopMost property is set to True,
or maybe you have an event which performs (usualy refresh datagrid/dataset)
actions that focus back the parent. I had the same problem, and that was the
issue. Normally, any created new form whose .Show() method is called, will
be displayed on top and focused, wether it's a MDI or not, unless you have
TopMost set to some toher forms.

Hope this helps.
"Kalv" <ka**@kalv.co.uk> wrote in message
news:59**************************@posting.google.c om...
Hi,

I have produced a MDI application in C#. And basically i produce a
child form from the container and then i produce another child from
that child.

I do this by (code in child frmCustomers)
frmCustomerSummary = new frmMatchSummary(....);
frmCustomerSummary.MDIParent = this.MDIParent;
frmCustomerSummary.Show();

This all works fine and the form is displayed as a MDI child But It's
not in focus, the title bar is not selected, although it is at the top
of the other forms. The frmCustomers that produced the child form is
selected, the only way to gain focus is click off and then back on
again.

I have tried .activate(), and it still doesn't still work.

What am i doing wrong?

Kalv

Nov 15 '05 #2
Hey, thanks for the reply, the TopMost property is not set on any of the
forms. on the frmCustomers form there is an activeX web Browser but also
on the new frmCustomerSummary that is opened.

The MDI window list that i have displayed under a menu indicates that
the new frmCustomerSummary that is opened is active as it has a tick
against it.

Very Wierd...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: al | last post by:
Greegins, I have child form included in an MDI form. Things work fine until I Close the child form. The prolem is when I try to open that same child form form menu, app crashes saying it can't...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
0
by: Bruin | last post by:
Hi All, I'm having a problem with MDI child forms when the reference to the MDI Parent is set in a Control library. (Sorry for the long post) I have an control library assembly which holds all...
3
by: Zack Sessions | last post by:
I am using VB.NET 2003. I have read the threads concerning the problem where the FormStartPosition of CenterParent is ignored if the form is displayed with the Show method as opposed to the...
7
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form...
2
by: Lenster | last post by:
Environment --------------- Visual Studio.NET 2003 Version 7.1.3088 ..NET Framework 1.1 Version 1.1.4322 SP1 XP Professional 5.1.2600 SP2 Build 2600 Problem Description...
2
by: Matt | last post by:
Ok here is my problem: I have a MDI parent form called "Main" that I declare in a public module when I start up my program. This form holds the drop down menu that allows my users to access all...
4
by: Richard Lewis Haggard | last post by:
What is the mechanism by which a child window can notify its parent that it has been clicked on? -- Richard Lewis Haggard www.Haggard-And-Associates.com
3
by: Adam Right | last post by:
Hi, I am developing an application which has established on MDI Form and there are many MDI Child forms. My problem is starting when i close the mdi child forms. They are not disposed from the...
4
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.