怎样使文本框里内容更新时它的垂直下拉条自动处于最下方,以显示最新的内容

jiangheng 2003-01-05 03:58:06
怎样使文本框(允许多行显示)的垂直下拉条永远自动处于最下方,以显示最新的内容
...全文
21 点赞 收藏 5
写回复
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jiangheng 2003-01-05
OK!谢谢了!
结帐!
回复
jiangheng 2003-01-05
Private Sub Timer1_Timer()
For i = 1 To 50
Text1.Text = Text1.Text & Chr(13) & Chr(10) & Time
Next i
END Sub
回复
jiangheng 2003-01-05
不行啊!
我在TIMER里循环写入文本框:
Private Sub Timer1_Timer()
For i = 1 To 50
Text1.Text = Text1.Text & Chr(13) & Chr(10) & Time
Next i
End Sub
麻烦再看一下!谢谢!
回复
Sean918 2003-01-05
Private Sub Text1_Change()
Text1.SelStart = Len(Text1.Text)
End Sub
回复
dragon525 2003-01-05
试试下面代码,不知能否达到你的要求?
Const EM_LINESCROLL = &HB6
Private Declare Function SendMessageBynum Lib "user32" Alias "
SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As
Long, ByVal lParam As Long) As Long

private form_Loaad()
call SendMessageBynum(Text1.hwnd, EM_LINESCROLL, 0, X) ' 向下卷X行可以自己设定
End sub
回复
发动态
发帖子
VB基础类
创建于2007-09-28

7451

社区成员

VB 基础类
申请成为版主
社区公告
暂无公告