Scroll a Textbox Control

  • Thread starter Thread starter Tom McLaughlin
  • Start date Start date
T

Tom McLaughlin

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

Thanks
Tom
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top