Search code examples
vb.netscrollbarmkannotationview

Scroll Down AnnotateViewer


Can you help me with this in VB.Net Im trying to have a shortcut here for my AnnotateViewer when i press "Ctrl + Down" the view must scroll down.

Here's the code that i tried

Dim pt As Point = iView.ScrollPosition
    If e.Control And e.KeyCode = Keys.NumPad0 Then
      pt.Y -= 99999
      Msg("Scroll Down")
    End If

Solution

  • yeah now it works. I used these codes

     If e.Control And e.KeyCode = Keys.NumPad2 Then
            iView.ScrollPosition += New Point(0, -90)
        ElseIf e.Control And e.KeyCode = Keys.NumPad8 Then
            iView.ScrollPosition += New Point(0, 90)
        ElseIf e.Control And e.KeyCode = Keys.NumPad4 Then
            iView.ScrollPosition += New Point(50, 0)
        ElseIf e.Control And e.KeyCode = Keys.NumPad6 Then
            iView.ScrollPosition += New Point(-50, 0)
    
        End If