Hi Yann, I created an example (Mac) for you where you can scroll the image both vertically and horizontally and also move the image with the mouse. Here is the project, I hope it meets your needs.
If X <> mouse1_x Or Y <> mouse1_Y Then
System.DebugLog "Scroll code works"
me.Scroll(delta_x,delta_y)
end if
And I obtained:
…
17:07:51 : Scroll code works
: Scroll code works
: Scroll code works
: Scroll code works
: Scroll code works
: Scroll code works
: Scroll code works
: Scroll code works
…
I’m happy to hear that it works. There are many ways to program it I only tried one and the first one that came to mind. Try testing it again and make changes if necessary.
If X <> mouse1_x Or Y <> mouse1_Y Then
System.DebugLog "Scroll code works"
Label_MouseInfo.Text = Label_MouseInfo.Text + Chr(13) + "=======" + Chr(13) + "Delta X : " + str(delta_x) + chr(13) + "Delta Y : " + str(delta_y)
me.Scroll(delta_x,delta_y)
end if
Result:
Delta X : -2
Delta Y : 1
Delta X : -8
Delta Y : 6
Delta X : -20
Delta Y : 16
etc…
The " me.Scroll(delta_x,delta_y)" part of the code doesn’t “fire”
1 - It “sticks” to the mouse. Once you have clicked on the image it keeps scrolling" even if you release the mouse
2 - It doesn’t refresh smoothly like in this video that I took as an example for my code