MDI亲子表格 [英] MDI Parent Child Forms

查看:90
本文介绍了MDI亲子表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,
我正在处理多种表格.
我在打开孩子的孩子形式时遇到问题.

1. TransMast.vb-MDI表格,
2. Contacts.vb-Windows窗体
3. Find.vb-Windows窗体

当我运行应用程序时,contacts.vb在TransMast.vb内部打开,但是当我单击在Contacts.vb中设置的查找"按钮以从数据库中查找联系人时,Find.vb在TrnasMast.vb外部打开.

谁能告诉我我必须进行哪些更改?

hi Friends,
I am working with multiple forms.
I am facing problem in opening child form of the child.

1. TransMast.vb - MDI Form,
2. Contacts.vb - Windows Form
3. Find.vb - Windows Form

While i run the application the contacts.vb opens inside the TransMast.vb, but when i click Find button which is set in Contacts.vb to find contacts from database, the Find.vb opens outside the TrnasMast.vb.

Can anyone tell me what changes i have to make ?

推荐答案

将其放在查找"按钮中
Place it in Find Button
Find fin=new Find()
fin.MdiParent=this.MdiParent;
Fin.show()



如果找不到解决方案,只需放置您的代码以更好地理解.



if u haven''t find solution,just place ur code for better understanding.


您可能尚未在表单上设置MDIParent属性.
You probably haven''t set the MDIParent property on the form.


判断您是否以
main 

作为您的主要形式,并且以

as your main form and

child

作为您的子形式

代码

as your child form

the code

child.mdiparent=parent
child.show


这篇关于MDI亲子表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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