Click here to Skip to main content
15,906,097 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Greetings,

I`m developing a desktop application using Visual Studio 2005 and a vb.net code.

I`m using one MDIParent form 'frmMDI' and about 20 Child Forms. In the frmMDI there is a MainMenuStrip that contains 20 ToolStripMenuItems each one used to load a corresponding child form through this code:

VB
Dim ChildForm As New frmInventoryItems
            ChildForm.MdiParent = Me
            g_pfrmMdiParent = Me
            Panel1.Controls.Add(ChildForm)
            ChildForm.Show()
            ChildForm.TopMost = True
            ChildForm.BringToFront()
            ChildForm.Focus()
            ChildForm.Text = "Manage Inventory"


So, that code is responsible to load a child form. Now what I`m facing after the loading of the child form is that the behavior of the controls of that child form is not so normal. Example: you can`t set the cursor to the end of the text in a textbox...

Please help me to overpass this situation. I`m really wondering what is really happening and I`m asking if there is a workaround to solve this issue...

Please help..
Posted

1 solution

You can make things acting normally by not using MDI. Honestly, why torturing yourself? In order to scare off your customers? This ugly and inconvenient UI style is highly discouraged, first and foremost by Microsoft.

I'll give you some ideas on what to do instead.

Please see:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
How to Create MDI Parent Window in WPF?[^],
Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to set child forms maximized, last childform minimized[^].

—SA
 
Share this answer
 
Comments
dgthecodeproject 24-May-12 3:44am    
I`m just working on this application for one year till now with a team of developers, so I can`t go and try to re-design all the UI interfaces and re-engineer all the written code.. What I need is to finish the 10% remaining from this application with no or min loses...So please if you have anything that may help me regarding this issue, Please provide it to me...
Sergey Alexandrovich Kryukov 28-May-12 17:43pm    
Well, to me it simply sounds like you want to make things worse. You see, if you invest development time is something which nobody would want to use (and, if it comes to money, will not bring any), this is even worse then not developing anything. "I cannot" is not an excuse. You don't need excuses, you need the solution. Imaging you perfectly resolves all the problems with your design, so, what's next? What's the use? See by yourself...
--SA
dgthecodeproject 29-May-12 1:34am    
Thx SAKryukov for your comment...But it is not the case here..I`m just a team member on this project which launched one year before...We almost done with it but we are facing this issue and its related to the MDI concept we are using...So the solutions here is not a lot..I should only provide the best solution/workaround to overpass this issue before the due date (after 1 month from now)...So if you have anything to help me, I`m ready to hear it...
Sergey Alexandrovich Kryukov 2-Jul-12 16:29pm    
You see, from my standpoint, there is not big difference if I talk to a person or a team. If a team makes a big mistake, it does not stop being a mistake. Some think the opposite. This is nothing more wrong as the speculation like "Ten millions developers cannot be wrong". They can be, very much.
--SA
dgthecodeproject 13-Jun-12 1:18am    
Please comments Guys...!!!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900