Private Sub Allocation_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.Load
ShowAlloactionSearchDialog()
End Sub
Private Sub ShowAlloactionSearchDialog()
If frmAllocationSearch Is Nothing OrElse frmAllocationSearch.IsDisposed Then
frmAllocationSearch = New AllocationSearch
frmAllocationSearch.MdiParent = Me.MdiParent
frmAllocationSearch.Info = Me.Info
frmAllocationSearch.Top = Me.Top
frmAllocationSearch.Left = Me.Left + Me.Width - frmAllocationSearch.Width
frmAllocationSearch.AllocationWindow = Me
frmAllocationSearch.Show()
Else
If frmAllocationSearch.WindowState = FormWindowState.Minimized Then
frmAllocationSearch.WindowState = FormWindowState.Normal
End IF
frmAllocationSearch.Activate()
End If
End Sub
也许你可以尝试
Form.Activated活动.
Occurs when the form is activated in code or by the user.
Private Sub Allocation_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.Load
ShowAlloactionSearchDialog()
End Sub
Private Sub ShowAlloactionSearchDialog()
If frmAllocationSearch Is Nothing OrElse frmAllocationSearch.IsDisposed Then
frmAllocationSearch = New AllocationSearch
frmAllocationSearch.MdiParent = Me.MdiParent
frmAllocationSearch.Info = Me.Info
frmAllocationSearch.Top = Me.Top
frmAllocationSearch.Left = Me.Left + Me.Width - frmAllocationSearch.Width
frmAllocationSearch.AllocationWindow = Me
frmAllocationSearch.Show()
Else
If frmAllocationSearch.WindowState = FormWindowState.Minimized Then
frmAllocationSearch.WindowState = FormWindowState.Normal
End IF
frmAllocationSearch.Activate()
End If
End Sub
也许你可以尝试
Form.Activated活动.
Occurs when the form is activated in code or by the user.