vb.net经典问题 vbnet doevent( 二 )


If MyBase.GetState(H40000) Then
Throw New InvalidOperationException(SR.GetString("ClosingWhileCreatingHandle", New Object() { "Close" }))
End If
If MyBase.IsHandleCreated Then
Me.closeReason = CloseReason.UserClosing
MyBase.SendMessage(H10, 0, 0)
Else
MyBase.Dispose
End If
End Sub'------- Dispose Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
Me.CalledOnLoad = False
Me.CalledMakeVisible = False
Me.CalledCreateControl = False
If MyBase.Properties.ContainsObject(Form.PropAcceptButton) Then
MyBase.Properties.SetObject(Form.PropAcceptButton, Nothing)
End If
If MyBase.Properties.ContainsObject(Form.PropCancelButton) Then
MyBase.Properties.SetObject(Form.PropCancelButton, Nothing)
End If
If MyBase.Properties.ContainsObject(Form.PropDefaultButton) Then
MyBase.Properties.SetObject(Form.PropDefaultButton, Nothing)
End If
If MyBase.Properties.ContainsObject(Form.PropActiveMdiChild) Then
MyBase.Properties.SetObject(Form.PropActiveMdiChild, Nothing)
End If
If (Not Me.MdiWindowListStrip Is Nothing) Then
Me.MdiWindowListStrip.Dispose
Me.MdiWindowListStrip = Nothing
End If
If (Not Me.MdiControlStrip Is Nothing) Then
Me.MdiControlStrip.Dispose
Me.MdiControlStrip = Nothing
End If
If (Not Me.MainMenuStrip Is Nothing) Then
Me.MainMenuStrip = Nothing
End If
Dim form As Form = DirectCast(MyBase.Properties.GetObject(Form.PropOwner), Form)
If (Not form Is Nothing) Then
form.RemoveOwnedForm(Me)
MyBase.Properties.SetObject(Form.PropOwner, Nothing)
End If
Dim formArray As Form() = DirectCast(MyBase.Properties.GetObject(Form.PropOwnedForms), Form())
Dim i As Integer = (MyBase.Properties.GetInteger(Form.PropOwnedFormsCount) - 1)
Do While (i = 0)
If (Not formArray(i) Is Nothing) Then
formArray(i).Dispose
End If
i -= 1
Loop
If (Not Me.smallIcon Is Nothing) Then
Me.smallIcon.Dispose
Me.smallIcon = Nothing
End If
Me.ResetSecurityTip(False)
MyBase.Dispose(disposing)
Me.ctlClient = Nothing
Dim menu As MainMenu = Me.Menu
【vb.net经典问题 vbnet doevent】If ((Not menu Is Nothing) AndAlso (menu.ownerForm Is Me)) Then
menu.Dispose
MyBase.Properties.SetObject(Form.PropMainMenu, Nothing)
End If
If (Not MyBase.Properties.GetObject(Form.PropCurMenu) Is Nothing) Then
MyBase.Properties.SetObject(Form.PropCurMenu, Nothing)
End If
Me.MenuChanged(0, Nothing)
Dim menu2 As MainMenu = DirectCast(MyBase.Properties.GetObject(Form.PropDummyMenu), MainMenu)
If (Not menu2 Is Nothing) Then
menu2.Dispose
MyBase.Properties.SetObject(Form.PropDummyMenu, Nothing)
End If
Dim menu3 As MainMenu = DirectCast(MyBase.Properties.GetObject(Form.PropMergedMenu), MainMenu)
If (Not menu3 Is Nothing) Then
If ((menu3.ownerForm Is Me) OrElse (menu3.form Is Nothing)) Then
menu3.Dispose
End If
MyBase.Properties.SetObject(Form.PropMergedMenu, Nothing)
End If
Else
MyBase.Dispose(disposing)
End If
End Sub
Vb.net小问题1.第一个问题正常的 , 只是不知道你要什么样的结果
2 。可以用ucase
3.用mid一个一个字符处理
vb.net经典问题的介绍就聊到这里吧,感谢你花时间阅读本站内容 , 更多关于vbnet doevent、vb.net经典问题的信息别忘了在本站进行查找喔 。

推荐阅读