473,385 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Scroll a Textbox Control

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

Thanks
Tom
Nov 20 '05 #1
1 1250

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 McLaughlin wrote:
How can I write code to scroll a textbox control line by line?

Thanks
Tom


Regards - OHM# On**********@BTInternet.com
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ted | last post by:
I am trying to return the vertical scroll position of a rich textbox control using Access 2000. It seems to work for the horizontal scroll bar, but not the vertical. Code follows: Option...
7
by: Mel Weaver | last post by:
Hello, How do you scroll to the bottom of a multiline textbox in code? Mel
3
by: Peter Row | last post by:
Hi, I have created a user control consisting of a textbox and a separate vertical scroll bar. The textbox is filled with data. However there could be lots of data so I only fill the textbox...
1
by: JC | last post by:
I'm sure you've all seen the save scroll position from 4 guys from rolla which can be found here > http://aspnet.4guysfromrolla.com/articles/111704-1.aspx BUT try to get that to work AND still be...
3
by: Rvo | last post by:
I have a userform which contains a textbox (System.Windows.forms.textbox) with multiline set to True. This box contains a certain number of characters which reach below the bottom of the box....
2
by: Mark Denardo | last post by:
Hi I'm trying to create a log window that keeps the user informed with misc messages. Right now I'm using a richtextbox (tried a regular textbox as well) that has a scrollbar and I append text to...
2
by: peng12341 | last post by:
I've created an empty tabpage. At runtime i add lots of controls with this function: For i = 0 To mani_settings.count Dim index Dim label As New Label label.Top = 12 + i * 26 label.Left = 8...
6
by: UJ | last post by:
I've got a multiline textbox that I'm using to display messages. Is there an easy way to have it scroll to the end after I add a line to the text of the box? TIA - Jeff.
0
by: Rachel | last post by:
I am developing an application for Windows Mobile devices using C#. I have a form that has several controls (labels and textboxes that are dynamically created on opening the form) and a vertical...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.