如何使MDIParent格式在VB.Net中正常运行? [英] How to make MDIParent form acts normally in VB.Net?

查看:78
本文介绍了如何使MDIParent格式在VB.Net中正常运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,

我正在使用Visual Studio 2005和vb.net代码开发桌面应用程序.

我使用一种MDIParent表格"frmMDI"和大约20个子表格.在frmMDI中,有一个MainMenuStrip,其中包含20个ToolStripMenuItem,每个ToolStripMenuItem用于通过以下代码加载相应的子窗体:

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:

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..

推荐答案

您可以通过不使用MDI来使事情正常运行.老实说,为什么要折磨自己?为了吓your你的顾客? Microsoft强烈建议不要使用这种丑陋且不便的UI样式.

我会给你一些有关如何做的想法.

请参阅:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages [如何在WPF中创建MDI父窗口? [ ^ ],
在WPF中使用MDI窗口的问题 [ ^ ],
MDIContainer提供错误 [如何最大程度地设置子表单,最小化最后一个子表单 [ ^ ].

—SA
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


这篇关于如何使MDIParent格式在VB.Net中正常运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆