怎样在运行时改变文本框的ScrollBars属性?

来源:百度知道 编辑:UC知道 时间:2024/06/20 17:08:46
好像sendmessage可以实现的吧,不知道怎么操作,知道的可否说下??
显然可以,看到windows中的记事本了吗?那个不是实现了吗?就是通过发消息的

我倾家荡产了啊,5555~~

你一说API我想起来咯~不过不是用sendmessage,而是用ShowsCrollBar,呵呵,

Private Declare Function ShowScrollBar Lib "user32" (ByVal hwnd As Long, ByVal wBar As Long, ByVal bShow As Long) As Long

Private Const SB_BOTH = 3

Private Sub Command1_Click()
ShowScrollBar Text1.hwnd, SB_BOTH, True
End Sub

Private Sub Command2_Click()
ShowScrollBar Text1.hwnd, SB_BOTH, False
End Sub

然后好像还要再设置ScrollBar的滚动属性~