473,388 Members | 1,309 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,388 software developers and data experts.

mdi and child

Hi,

Under MDI form, there're some child forms should be active instead of create
new one, if they're existing

So, in which way we could determine the child form that is display.?

....

if ( frmChild is exitsing)
frmChild.Active();
else
new Child();

....

Thanks
------------------------------------------------
Nov 16 '05 #1
2 1173
Dean,

That's dependent on your application. You should derive all of your
forms from a base form that you define, which will have an overridable
method which will determine whether or not the form that is showing is of
the type that you are looking for. Either that, or it could expose a key
for this type (and another key for the instance of that type), and you could
store those in a hash table.

Either way, you would have the form expose what "kind" it is, and then
filter based on that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Dean L. Howen" <co*****@hotpop.com> wrote in message
news:e9**************@TK2MSFTNGP12.phx.gbl...
Hi,

Under MDI form, there're some child forms should be active instead of
create
new one, if they're existing

So, in which way we could determine the child form that is display.?

...

if ( frmChild is exitsing)
frmChild.Active();
else
new Child();

...

Thanks
------------------------------------------------

Nov 16 '05 #2
Dean,

That's dependent on your application. You should derive all of your
forms from a base form that you define, which will have an overridable
method which will determine whether or not the form that is showing is of
the type that you are looking for. Either that, or it could expose a key
for this type (and another key for the instance of that type), and you could
store those in a hash table.

Either way, you would have the form expose what "kind" it is, and then
filter based on that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Dean L. Howen" <co*****@hotpop.com> wrote in message
news:e9**************@TK2MSFTNGP12.phx.gbl...
Hi,

Under MDI form, there're some child forms should be active instead of
create
new one, if they're existing

So, in which way we could determine the child form that is display.?

...

if ( frmChild is exitsing)
frmChild.Active();
else
new Child();

...

Thanks
------------------------------------------------

Nov 16 '05 #3

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

Similar topics

3
by: DavidS | last post by:
Have parent.aspx from which I open Driver.aspx form via button on parent.aspx. When I first open the modal dialog, the driver.aspx Page_Load function is called. After I close the dialog, then...
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...
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
12
by: Phil | last post by:
I can check for MdiChildren.Length=0, but which event handler should I put this in to detect when a child window is closed? TIA Phil.
4
by: jewel87 | last post by:
Hi everyone! I'm writing some code in C under UNIX, which should give some output like this: PARENT: pid = 10063 CHILD: my pid = 10064 CHILD: my parent's pid = 10063 CHILD: Sleeping... PARENT:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.