0
我有一個「加載」的形式,我做冗長的過程時顯示爲模態形式。 我正在使用下面的窗體來保持執行該過程的子窗體。然而,當最小化\「最大化」加載「表單出現在父項之前,使其看起來有點不專業。管理模態表單的位置
我能做些什麼(延遲它出現或以不同的方式附加它)?
Private _childForm As FormBusy
Private Const NIM_DELETE = &H2
Private Sub SetChildFormPosition()
If _childForm Is Nothing Then
Return
End If
Dim newLocation As New Point()
newLocation.X = Me.Location.X + ((Me.Width - _childForm.Width) \ 2)
newLocation.Y = Me.Location.Y + ((Me.Height - _childForm.Height) \ 2)
_childForm.Location = newLocation
End Sub
Private Sub ParentForm_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged
SetChildFormPosition()
End Sub