I have a rich text box that get scroll position with the code below
Private Declare Auto Function RtfScroll _
Lib "user32.dll" Alias "SendMessage" ( _
ByVal hWnd As IntPtr, _
ByVal Msg As Integer, _
ByVal wParam As IntPtr, _
ByRef lParam As System.Drawing.Point) As Integer
Private Const WM_USER = &H400
Private Const EM_GETSCROLLPOS = WM_USER + 221
Private Const EM_SETSCROLLPOS = WM_USER + 222
To get scroll position:
Dim pt As New System.Drawing.Point()
RtfScroll(rt.Handle, EM_GETSCROLLPOS, 0, pt)
to set scroll position to x=0, y =100:
RtfScroll(RichTextCtl.Handle, EM_SETSCROLLPOS, 0, New System.Drawing.Point(0, 100))
Quote:
I want to create a bookmark right in this position on scrollbar like scrollbar enhanced in visual studio in cod view.
What I have tried:
I have no idea how I can do this