G
Gary Brizard
OK. Why wont' the folowing code cause a richtextbox to scroll down?
Declare Auto Function SendMessage Lib "User32.dll" (ByVal hwnd As Long,
ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Point) As Long
Const WM_USER = 1024
Const EM_SETSCROLLPOS = WM_USER + 222
Private Function DoesNotWork()
Dim pt As New Point
Dim hWnd As Long = Me.RichTextBox1.Handle.ToInt32
pt.X = 0
pt.Y = 12
Dim l As Long = Win32.SendMessage(Me.RichTextBox1.Handle.ToInt32,
EM_SETSCROLLPOS, 0, pt)
End Function
Declare Auto Function SendMessage Lib "User32.dll" (ByVal hwnd As Long,
ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Point) As Long
Const WM_USER = 1024
Const EM_SETSCROLLPOS = WM_USER + 222
Private Function DoesNotWork()
Dim pt As New Point
Dim hWnd As Long = Me.RichTextBox1.Handle.ToInt32
pt.X = 0
pt.Y = 12
Dim l As Long = Win32.SendMessage(Me.RichTextBox1.Handle.ToInt32,
EM_SETSCROLLPOS, 0, pt)
End Function