473,326 Members | 2,061 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,326 software developers and data experts.

mdi child detach reattach problem

We have MDI WinForms C# .Net2 application.
Parent form has MdiContainer=true;

Children forms are created like this:
Form child = new Form();
child.MdiParent = this;
child.Show();
To detach mdi child I use:
child.MdiParent = null;
If user wants to reattach child form back:
child.MdiParent = parent; where parent is original parent of the form
child form is added to list of MdiChildren and becomes active,
however
I can't click between Mdi Child forms the way I could before, the
only
way to get child form active is to click at its header.
It is easily reproducable on small example.

Nov 6 '07 #1
2 4502
Marina,

I don't think that the MdiParent property is meant to be changed once
you set the parent. The question is, why are you setting the parent to
null, and then setting it back?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Marina" <ma*************@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
We have MDI WinForms C# .Net2 application.
Parent form has MdiContainer=true;

Children forms are created like this:
Form child = new Form();
child.MdiParent = this;
child.Show();
To detach mdi child I use:
child.MdiParent = null;
If user wants to reattach child form back:
child.MdiParent = parent; where parent is original parent of the form
child form is added to list of MdiChildren and becomes active,
however
I can't click between Mdi Child forms the way I could before, the
only
way to get child form active is to click at its header.
It is easily reproducable on small example.

Nov 6 '07 #2
On Nov 6, 12:26 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Marina,

I don't think that the MdiParent property is meant to be changed once
you set the parent. The question is, why are you setting the parent to
null, and then setting it back?

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com"Marina" <marina.sokol...@gmail.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...
We have MDI WinForms C# .Net2 application.
Parent form has MdiContainer=true;
Children forms are created like this:
Form child = new Form();
child.MdiParent = this;
child.Show();
To detach mdi child I use:
child.MdiParent = null;
If user wants to reattach child form back:
child.MdiParent = parent; where parent is original parent of the form
child form is added to list of MdiChildren and becomes active,
however
I can't click between Mdi Child forms the way I could before, the
only
way to get child form active is to click at its header.
It is easily reproducable on small example.- Hide quoted text -

- Show quoted text -
User might decide that he wants to attach window back. If it is the
wrong way to detach/reattach mdi child, what is the right one?

Nov 6 '07 #3

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

Similar topics

2
by: Jose | last post by:
Hello, A utility I was running caused our database's log file to run out of hard drive. So, I detached the database, deleted the log file, and tried to reattach. SQL server fails to...
4
by: DBA | last post by:
If I detach a database on a server, then attach the database with a single file only using the data file...will I lose any transactions that were in the original log file? There is a debate going...
0
by: Ramesh K | last post by:
Hi All, Here is the scenario where i am having the problem. There is a COM component let us say "A" is running under DLLHOST . "A" creates normal COM component "B". To debug the component B i...
0
by: | last post by:
I inherited Form2 from Form1 and I would like to be able to change the button text in Form1 from Form2. How can I do that? Since the button is also inherited, I don't know how to tell the program...
0
by: Ramesh K | last post by:
Hi All, Here is the scenario where i am having the problem. There is a COM component let us say "A" is running under DLLHOST . "A" creates normal COM component "B". To debug the component B i...
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...
2
by: =?Utf-8?B?Um9nZWxpbw==?= | last post by:
so I notice to detach a database you use Server svr = new Server(); svr.DetachDatabase("MyDatabase"); but is there a way you can set where its saved after detaching ? thansk
1
by: RP | last post by:
I am using SQL Server 2005 with C# 2005. I want to programmatically Detach a database, then copy its files from the data folder to another location and then Attach the database back. Can it be done...
9
by: dpatel75 | last post by:
I am trying to copy a database from a SQL 2000 SP3 Windows 2000 server to a 2005 SP2 Windows 2003 server. I am trying to use detach and attach method (have tried both within Management Studio and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.