0
當我點擊從兒童形式的關閉按鈕孩子將移動到屏幕然後關閉整齊..但是,當我通過關閉父按鈕關閉孩子將移動到屏幕然後凍結...爲什麼? TNX提前..我得到了父母和我的孩子form..but當我關閉孩子它凍結..爲什麼?
Public Class ParentForm
Private Sub Show_Click(sender As Object, e As EventArgs) Handles button.Click
ChildForm.MdiParent = Me
ChildForm.Show()
End Sub
Private Sub Close_Click(sender As Object, e As EventArgs) Handles Login.Click
ChildForm.Refresh()
Do Until Me.Location.X = ChildForm.Width
ChildForm.Location = New Point(ChildForm.Location.X + 1, 250)
Loop
ChildForm.Close()
End Sub
end class
Public Class ChildForm
Private Sub ChildForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Location = New Point(0, 250)
Me.Refresh()
end Sub
Sub anim() Handles Me.Shown
Me.Refresh()
Do Until Me.Location.X = 350
Me.Location = New Point(Me.Location.X + 1, 250)
Loop
End Sub
Private Sub Close_Click(sender As Object, e As EventArgs) Handles Close.Click
Do Until Me.Location.X = Me.Width + 1000
Me.Location = New Point(Me.Location.X + 1, 250)
Loop
Me.Close()
End Sub
end class
我會試試它..tnx隊友! :d – user3211476