Scroll a Textbox Control

  • Thread starter Thread starter Tom McLaughlin
  • Start date Start date
Declare at class level

Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA"
(ByVal hWnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal
lParam As Int32) As Int32

Const WM_VSCROLL As Int32 = &H115

Const SB_LINEDOWN As Int32 = 1

Const SB_LINEUP As Int32 = 0



In buttons.

For example to scroll UP

Private Sub ScrollUP_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ScrollUP.Click

SendMessage(lb1.Handle, WM_VSCROLL, SB_LINEUP, 0)

End Sub

Regards - OHM#






Tom said:
How can I write code to scroll a textbox control line by line?

Thanks
Tom

Regards - OHM# (e-mail address removed)
 
Back
Top