如何在客户显示中垂直滚动文本 [英] How to vertically scroll the text in customer display

查看:84
本文介绍了如何在客户显示中垂直滚动文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何在客户显示屏中垂直滚动文字。现在我能够显示它,但如果超过20的角色它应该滚动我怎么能做到。

i我正在使用vb6。



谢谢



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

推荐答案

如果使用TextBox控件来显示文本。

使用以下代码向下滚动:



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

Text1.SelStart = Len(Text1.Text)





PS:假设TextBox控件的名称为Text1

并且TextBox的Proprety多行必须为true。



如果您正在使用包含垂直滚动条的控件

使用此API函数滚动它





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

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)


这篇关于如何在客户显示中垂直滚动文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆