Move image using UP, DOWN, LEFT and RIGHT arrow keyboard keys

Feature Requests for GdPicture.NET.
Post Reply
abinmathew
Posts: 6
Joined: Wed Nov 23, 2016 6:10 pm

Move image using UP, DOWN, LEFT and RIGHT arrow keyboard keys

Post by abinmathew » Tue Mar 28, 2017 8:04 pm

Hi,

I am looking for moving a zoomed in page using arrow keys(keyboard) inside GDViewer WPF, can we achieve it, or any suggestion/existing ways to go forward.

Thanks and Regards,
Abin Mathew.

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: Move image using UP, DOWN, LEFT and RIGHT arrow keyboard keys

Post by Gabriela » Sun Feb 03, 2019 7:48 pm

Hello,

Maybe this code snippet can be useful:

Code: Select all

Private Sub GdViewer1_KeyDownControl(ByVal sender As Object, ByVal e As AxGdViewerPro4.__GdViewer_KeyDownControlEvent) Handles GdViewer1.KeyDownControl
    Select Case e.keyAscii
            Case 38
                Me.GdViewer1.SetVScrollBarPosition((Me.GdViewer1.GetVScrollBarPosition() - 20))
            Case 40
                Me.GdViewer1.SetVScrollBarPosition((Me.GdViewer1.GetVScrollBarPosition() + 20))
            Case 37
                Me.GdViewer1.SetHScrollBarPosition((Me.GdViewer1.GetHScrollBarPosition() - 20))
            Case 39
                Me.GdViewer1.SetHScrollBarPosition((Me.GdViewer1.GetHScrollBarPosition() + 20))
    End Select
End Sub

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest