问题描述
嗨
假设我有两种形式:Form1和Form2。我在Form1的代码中创建并显示了一个
Form2的实例,例如
Dim myForm2 = New Form2
myForm2.Show ()
如何告诉myForm2 Form1是它的父级?也就是说,当我查看
时,父母或ParentForm或ParentForm。在Form2中,它们都显示Nothing。
任何人都可以帮忙???
提前致谢
Geoff
Hi
Suppose I have two forms: Form1 and Form2. I create and show an instance of
Form2 in the code of Form1 e.g.
Dim myForm2 = New Form2
myForm2.Show()
How do I tell myForm2 that Form1 is its parent? That is, when I look at
either "Parent" or "ParentForm" in Form2, they both show "Nothing".
Can anybody help???
Thanks in advance
Geoff
推荐答案
您想以模态方式显示表单吗?
\ \\
Dim MyForm2 As New Form2()
MyForm2.ShowDialog()
///
-
MS Herfried K. Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http://dotnet.mvps.org/dotnet/faqs/>
Do you want to show your form modally?
\\\
Dim MyForm2 As New Form2()
MyForm2.ShowDialog()
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
您想以模态方式显示表单吗?
\\\
Dim MyForm2 As New Form2()
MyForm2.ShowDialog()
///
- MS Herfried K. Wagner
MVP< URL :http://dotnet.mvps.org/>
VB< URL:http://dotnet.mvps.org/dotnet/faqs/>
Do you want to show your form modally?
\\\
Dim MyForm2 As New Form2()
MyForm2.ShowDialog()
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
这篇关于问:表格的父母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!