I want to use the sendmessage EM_GETSCROLLPOS to get the scrollposition of a richtextbox and send it to an other richtextbox.
It al works fine but when i load a lot of data in the richtextbox the value of the point in the api is bigger then the integer of the point type can handle (>65386)
The help say's that a point can handle values up to 2,147,483,647
what am i doing wrong??
It al works fine but when i load a lot of data in the richtextbox the value of the point in the api is bigger then the integer of the point type can handle (>65386)
The help say's that a point can handle values up to 2,147,483,647
what am i doing wrong??
Code:
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef lParam As Point) As Integer
Private Sub myTextRTB_VScroll(ByVal sender As Object, ByVal e As System.EventArgs) Handles myTextRTB.VScroll
Dim myPoint As Point = New Point
SendMessage(myTextRTB.Handle.ToInt32,
sendMessageEnum.EM_GETSCROLLPOS, 0, myPoint)
SendMessage(myLineRTB.Handle.ToInt32,
sendMessageEnum.EM_SETSCROLLPOS, 0, myPoint)
end sub
[end code]