Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

How can i scroll the text vertically in the customer display. now i am able to display it but if the character more than 20 it should scroll how can i make it.
i am using vb6.

Thank you
Posted
Updated 8-Jun-15 23:13pm
v2
Comments
CHill60 9-Jun-15 5:26am    
What control(s) are you using to display the text?
Do you want to automatically scroll down - if so at what pace?
What have you tried so far?
Do you absolutely have to use VB6 or is VB.Net an option?
jmavrix 9-Jun-15 5:38am    
Hi,

to display the text i am using the following code
MSComm1.CommPort = frmMain.pubPortNo
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
MSComm1.Output = Chr(12)
MSComm1.Output = txtOutNM + txtOutRT

after displaying the text it should continuously scroll, till i select next item( whatever text displaying it must be scrolled)
vb6 or vb.net is fine.
CHill60 9-Jun-15 5:44am    
What is this "customer display" on? You're sending data through a port not displaying it
jmavrix 9-Jun-15 11:19am    
yes , how can i scroll it
CHill60 9-Jun-15 11:27am    
I asked a question - what device is the customer display on. You can't scroll a port

1 solution

If you use a TextBox control to display the text.
Using following code to scroll down:

VB
Text1.SelStart = Len(Text1.Text)


PS:Assume that the TextBox control's name called Text1
And the TextBox's Proprety multiline must be true.

If you are using a control that contains a vertical scrollbar
Use this API function to scroll it

VB
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Const EM_LINESCROLL = &HB6 'Declare Constants
Dim LineNumber As Integer 'Line Numbers You Want to Scroll

Call SendMessage(Control.hwnd, EM_LINESCROLL, 0, LineNumber)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900