VB Code:
'Declaring the SendMessage API - To send a Message to other Windows Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Const LB_SETHORIZONTALEXTENT = &H194 'Set the Horizontal Bar to 2 times its Width Dim lngReturn As Long Dim lngExtent As Long lngExtent = 2 * (Form1.List1.Width / Screen.TwipsPerPixelX) lngReturn = SendMessage(Form1.List1.hWnd, LB_SETHORIZONTALEXTENT, lngExtent, 0&)




Reply With Quote