0
我真的很恼火在这里。我不明白为什么这个事件不断抛出一个空白的错误。以下是我的代码。VB.Net SelectedChangeCommitted抛出错误
Private Sub cboSections_SelectedChangeCommitted(sender As System.Object, e As System.EventArgs) Handles cboSections.SelectionChangeCommitted
On Error GoTo EH
If TypeOf sender Is Windows.Forms.ComboBox Then
'some boolean that checks if we are skipping this event, thus it does if so
If mbSkipEvent Then Exit Sub
'checks if index that was changed to is > 0 then it toggles the bottom command buttons
If cboSections.SelectedIndex > 0 Then
ToggleCmdButtons(True)
Else
ToggleCmdButtons(False)
End If
'sets the string msPurpose
msPurpose = "Show Section"
Debug.Print("Im here")
End If
EH:
Debug.Print("Error Description: " & Err.Description)
End Sub
在我的输出中,我得到“错误描述:”。而已。如果任何人有任何解决方案或指向正确的方向将是伟大的。
On Error Goto?请救我。 –
我想这是不好的做法... – j0hnstew