MDI表格 [英] MDI forms
问题描述
大家好,
我有我的MDI表格和10个儿童表格,我在菜单上点击
活动使用
Dim NewChildFrm作为新的newCustomerForm
NewChildFrm.MdiParent =我
NewChildFrm.Show()
我可以阻止从菜单中打开另一个newCustomerForm吗?如果是
已经是一个并且开放只是关注表格。
提前提前
JFB
*" JFB" < JF ***** @ directvinternet.com> scripsit:我有我的MDI表单和10个子表单,我在菜单上点击
事件调用子表单使用
Dim NewChildFrm作为新的newCustomerForm
NewChildFrm.MdiParent =我
NewChildFrm.Show()
我可以阻止从菜单中打开另一个newCustomerForm?如果
已经是一个并且打开则只关注表单。
\\\
私有myform As Form2
Private Sub Button1_Click(_
ByVal sender As System.Object,_
ByVal e As System.EventArgs _
)处理Button1.Click
如果myform什么都没有那么
myform = New Form2()
''myform .MdiParent =我
AddHandler myform.Closed,AddressOf Me.ChildForm_Closed
myform.Show()
Else
''MsgBox(表格已打开:& myform.Text)
Me.ActivateMdiChild(myform)''Ungetestet:Evtl。 funktioniert
''das nicht,da dieMethodefürdie
''interne Infrastruktur dient。
结束如果
结束子
私人子ChildForm_Closed(_
ByVal发件人作为对象,_
ByVal e As System.EventArgs _
)处理MyBase.Closed
myform = Nothing
End Sub
///
-
Herfried K. Wagner [MVP]
< http://www.mvps.org/dotnet>
" JFB" < JF ***** @ directvinternet.com> schrieb大家好,
我有我的MDI表格和10个子表单,我在菜单上用
点击事件调用子表格使用
Dim NewChildFrm As new newCustomerForm
NewChildFrm.MdiParent = Me
NewChildFrm.Show()
我可以阻止从菜单中打开另一个newCustomerForm?如果
已经是一个并且打开则只关注表单。
http://groups.google.com/groups?thre...tngp13.phx.gbl
-
Armin
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
Herfried,
我收到了错误...
本地变量''NewChildFrm''在声明之前无法引用。
但我之前已经声明过.. 。
Tks for you help
JFB
" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在消息中写道
news:br ************* @ ID-208219.news.uni-berlin.de ...*JFB < JF ***** @ directvinternet.com> scripsit:我有我的MDI表格和10个子表单,我在菜单上使用
Dim NewChildFrm作为新的newCustomerForm来调用
点击事件中的子表单
NewChildFrm.MdiParent =我
NewChildFrm.Show()
我可以阻止从菜单中打开另一个newCustomerForm?如果
已经是一个并且开放只是专注于表格。
\\\
私人myform作为Form2
> Private Sub Button1_Click(_
ByVal sender As System.Object,_
ByVal e As System.EventArgs _
)处理Button1.Click
如果myform是Nothing那么
myform = New Form2()
''myform.MdiParent =我
AddHandler myform.Closed,AddressOf Me.ChildForm_Closed
myform.Show()
其他
' 'MsgBox(表格已打开:& myform.Text)
Me.ActivateMdiChild(myform)''Ungetestet:Evtl。 funktioniert
''das nicht,da dieMethodefürdie
''interne Infrastruktur dient。
结束如果
End Sub
Private Sub ChildForm_Closed(_
ByVal发送者作为对象,_
ByVal e As System.EventArgs _
)处理MyBase.Closed
myform = Nothing
结束子
///
-
Herfried K. Wagner [MVP]
< http://www.mvps.org/dotnet>
Hi All,
I have my MDI form and 10 child forms, I call the child form on the click
event from the menu using
Dim NewChildFrm As New newCustomerForm
NewChildFrm.MdiParent = Me
NewChildFrm.Show()
What can I prevent to open another newCustomerForm from the menu? if is
already one and open just got focus on the form.
Tks in advance
JFB
* "JFB" <jf*****@directvinternet.com> scripsit:I have my MDI form and 10 child forms, I call the child form on the click
event from the menu using
Dim NewChildFrm As New newCustomerForm
NewChildFrm.MdiParent = Me
NewChildFrm.Show()
What can I prevent to open another newCustomerForm from the menu? if is
already one and open just got focus on the form.
\\\
Private myform As Form2
Private Sub Button1_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles Button1.Click
If myform Is Nothing Then
myform = New Form2()
''myform.MdiParent = Me
AddHandler myform.Closed, AddressOf Me.ChildForm_Closed
myform.Show()
Else
''MsgBox("Form already open: " & myform.Text)
Me.ActivateMdiChild(myform) '' Ungetestet: Evtl. funktioniert
'' das nicht, da die Methode für die
'' interne Infrastruktur dient.
End If
End Sub
Private Sub ChildForm_Closed( _
ByVal sender As Object, _
ByVal e As System.EventArgs _
) Handles MyBase.Closed
myform = Nothing
End Sub
///
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
"JFB" <jf*****@directvinternet.com> schriebHi All,
I have my MDI form and 10 child forms, I call the child form on the
click event from the menu using
Dim NewChildFrm As New newCustomerForm
NewChildFrm.MdiParent = Me
NewChildFrm.Show()
What can I prevent to open another newCustomerForm from the menu? if
is already one and open just got focus on the form.
http://groups.google.com/groups?thre...tngp13.phx.gbl
--
Armin
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
Herfried,
I got an error...
Local variable ''NewChildFrm'' cannot be referred to before it is declared.
But I already declare before...
Tks for you help
JFB
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:br*************@ID-208219.news.uni-berlin.de...* "JFB" <jf*****@directvinternet.com> scripsit:I have my MDI form and 10 child forms, I call the child form on the click event from the menu using
Dim NewChildFrm As New newCustomerForm
NewChildFrm.MdiParent = Me
NewChildFrm.Show()
What can I prevent to open another newCustomerForm from the menu? if is
already one and open just got focus on the form.
\\\
Private myform As Form2
Private Sub Button1_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles Button1.Click
If myform Is Nothing Then
myform = New Form2()
''myform.MdiParent = Me
AddHandler myform.Closed, AddressOf Me.ChildForm_Closed
myform.Show()
Else
''MsgBox("Form already open: " & myform.Text)
Me.ActivateMdiChild(myform) '' Ungetestet: Evtl. funktioniert
'' das nicht, da die Methode für die
'' interne Infrastruktur dient.
End If
End Sub
Private Sub ChildForm_Closed( _
ByVal sender As Object, _
ByVal e As System.EventArgs _
) Handles MyBase.Closed
myform = Nothing
End Sub
///
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
这篇关于MDI表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!