主题:子窗口出現重影
各位大俠,請指教!我在調用子窗口時,有出理重影的情況.不知怎樣解決.注,不是每個窗口的都有重影,有其中一個或兩個有重影現象.但寫法完全一樣.
先定義屬性
#Region "PROD_F Initalizing Property"
Private Shared PROD_F1 As PROD_F
Private Shared InitalizingDefInstance As Boolean
Public Shared Property DefInstance() As PROD_F
Get
If PROD_F1 Is Nothing OrElse PROD_F1.IsDisposed Then
InitalizingDefInstance = True
PROD_F1 = New PROD_F()
InitalizingDefInstance = False
End If
DefInstance = PROD_F1
End Get
Set(ByVal Value As PROD_F)
PROD_F1 = DefInstance
End Set
End Property
#End Region
再調用窗口
PROD_F.DefInstance.MdiParent = Me
PROD_F.DefInstance.Show()
先定義屬性
#Region "PROD_F Initalizing Property"
Private Shared PROD_F1 As PROD_F
Private Shared InitalizingDefInstance As Boolean
Public Shared Property DefInstance() As PROD_F
Get
If PROD_F1 Is Nothing OrElse PROD_F1.IsDisposed Then
InitalizingDefInstance = True
PROD_F1 = New PROD_F()
InitalizingDefInstance = False
End If
DefInstance = PROD_F1
End Get
Set(ByVal Value As PROD_F)
PROD_F1 = DefInstance
End Set
End Property
#End Region
再調用窗口
PROD_F.DefInstance.MdiParent = Me
PROD_F.DefInstance.Show()