发信人: garfieldmao()
整理人: (2000-11-25 21:29:31), 站内信件
|
Public Const WM_USER = &H400
Public Const LB_SETHORIZONTALEXTENT = WM_USER + 21
Declare Function SendMessage Lib "user32" Alias _
"SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, lParam As Long) As Long
Sub CheckListBox(ListBox1 As ListBox)
Dim i As Integer
Dim res As Long
Dim Scrollwidth As Long
Scrollwidth = 0
For i = 0 To ListBox1.ListCount - 1
If TextWidth(ListBox1.List(i)) > Scrollwidth Then _
Scrollwidth = TextWidth(ListBox1.List(i))
Next i
res = SendMessage(ListBox1.hWnd, LB_SETHORIZONTALEXTENT, _
Scrollwidth, 0&)
End Sub
-- ※ 修改:.garfieldmao 于 Nov 20 20:13:53 修改本文.[FROM: 61.141.67.104] ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 61.141.67.104]
|
|