Private Sub TextBoxCode_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBoxCode.KeyDown
Try
'* 如果在验证码还没出现的时候用户去按了按键按键,就会出现异常.
If LabelMask.Controls.Count = 0 Then
Exit Sub
End If
Dim webexplorer As WebBrowser = DirectCast(LabelMask.Controls(0), WebBrowser)
If webexplorer.IsBusy Then
Exit Sub
End If
If e.KeyCode = Keys.Down AndAlso e.Modifiers = Keys.Control AndAlso LocationY > 410 Then
LocationY = LocationY - 5
webexplorer.Document.Window.ScrollTo(LocationX, LocationY)
SaveLocation(LocationX, LocationY)
End If
If e.KeyCode = Keys.Up AndAlso e.Modifiers = Keys.Control AndAlso LocationY < 610 Then
LocationY = LocationY + 5
webexplorer.Document.Window.ScrollTo(LocationX, LocationY)
SaveLocation(LocationX, LocationY)
End If
If e.KeyCode = Keys.Right AndAlso e.Modifiers = Keys.Control AndAlso LocationX > 300 Then
LocationX = LocationX - 5
webexplorer.Document.Window.ScrollTo(LocationX, LocationY)
SaveLocation(LocationX, LocationY)
End If
If e.KeyCode = Keys.Left AndAlso e.Modifiers = Keys.Control AndAlso LocationX < 500 Then
LocationX = LocationX + 5
webexplorer.Document.Window.ScrollTo(LocationX, LocationY)
SaveLocation(LocationX, LocationY)
End If
Catch exp As Exception
Call UploadException(exp)
If Me.Mini Then
Me.Hide()
End If
End Try
End Sub