Form.Show问题 [英] Form.Show problem
问题描述
在VB6中我有这个在frmMain:
私人子按钮1_Click()
frmSecondOne.Show
me.Hide
结束Sub
然后在frmSecondOne:
Private Sub Form_QueryUnload(取消为整数,UnloadMode为整数)
frmMain.Show
结束子
如何在VB.NET中执行此操作?
这个怎么样?使用ShowDialog查找表单何时关闭。
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As
System.EventArgs)Handles Button1.Click
Dim newForm As new frmSecondOne
Me.Hide()
newForm.ShowDialog()
Me.Show()
End Sub
" Kevin" <柯**** @ cfl.rr.com>在消息中写道
news:ae ******************************** @ 4ax.com ...在VB6中我有这个在frmMain:
私人子Button1_Click()
frmSecondOne.Show
me.Hide
结束Sub
然后在frmSecondOne:
Private Sub Form_QueryUnload(取消为整数,UnloadMode为整数)
frmMain.Show
End Sub
如何在VB.NET中执行此操作?
不好。我需要在显示第二种形式时显示其他形式。
另外,我如何在frmMain上引用文本框或列表框?
VB6:
Text1 = frmMain.Text1
***通过Developersdex发送 http://www.developersdex.com ***
不要只是参加USENET ......获得奖励!
"凯文" <柯**** @ cfl.rr.com> schrieb:在VB6中我有这个在frmMain:
私人子Button1_Click()
frmSecondOne.Show
me.Hide
结束Sub
然后在frmSecondOne:
Private Sub Form_QueryUnload(取消为整数,UnloadMode为整数)
frmMain.Show
End Sub >
如何在VB.NET中执行此操作?
\\\
Public Sub Main()
Dim f As New Form1()
f.Show()
Application.Run()
结束Sub $ / $
///
点击按钮:
\\\
Dim f2 As New Form2()
f2.Show()
Me.Close()
///
您可以通过调用''Application.ExitThread''来退出应用程序。
-
MS Herfried K .Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http://dotnet.mvps.org/ dotnet / faqs />
In VB6 I have this in frmMain:
Private sub Button1_Click()
frmSecondOne.Show
me.Hide
End Sub
and then in frmSecondOne:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
frmMain.Show
End Sub
How do I do this in VB.NET?解决方案How about this? Using ShowDialog to find out when the form is closed.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim newForm As New frmSecondOne
Me.Hide()
newForm.ShowDialog()
Me.Show()
End Sub
"Kevin" <ke****@cfl.rr.com> wrote in message
news:ae********************************@4ax.com...In VB6 I have this in frmMain:
Private sub Button1_Click()
frmSecondOne.Show
me.Hide
End Sub
and then in frmSecondOne:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
frmMain.Show
End Sub
How do I do this in VB.NET?
No good. I need to show other forms while showing the second form.
Also, how would I reference a textbox or Listbox on frmMain?
VB6:
Text1 = frmMain.Text1
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
"Kevin" <ke****@cfl.rr.com> schrieb:In VB6 I have this in frmMain:
Private sub Button1_Click()
frmSecondOne.Show
me.Hide
End Sub
and then in frmSecondOne:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
frmMain.Show
End Sub
How do I do this in VB.NET?
\\\
Public Sub Main()
Dim f As New Form1()
f.Show()
Application.Run()
End Sub
///
In a button:
\\\
Dim f2 As New Form2()
f2.Show()
Me.Close()
///
You can exit the application by calling ''Application.ExitThread''.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
这篇关于Form.Show问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!