请看看以下的代码,怎么会有问题?
我用的是VS.2005,是VB.2005的初学者Private Sub KeyboardMouseForm_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles Me.MouseDown
Me.KeyPreview = True
If Me.Controls.Count = 0 Then
ElseIf e.KeyCode = Keys.Up Or e.KeyCode = Keys.Down Then
Dim ctrl As Control = Me.ActiveControl
Dim moveforward As Boolean = (e.KeyCode = Keys.Down)
Do
ctrl = Me.GetNextControl(ctrl, moveforward)
If Not (ctrl Is Nothing) AndAlso ctrl.CanFocus AndAlso ctrl.TabStop Then
ctrl.Focus()
Exit Do
End If
Loop
End If
End Sub
错误 1 方法“Private Sub KeyboardMouseForm_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs)”无法处理事件“Public Event MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs)”,因为它们不具有相同的签名。