Enum SystemMetricConstants
smCXScreen = 0 'X Size of screen
smCYScreen = 1 'Y Size of Screen
smCXVScroll = 2 'X Size of arrow in vertical scroll bar.
smCYHScroll = 3 'Y Size of arrow in horizontal scroll bar
smCYCaption = 4 'Height of windows caption
smCXBorder = 5 'Width of non-sizable borders
smCYBorder = 6 'Height of non-sizable borders
smCXDlgFrame = 7 'Width of dialog box borders
smCYDlgFrame = 8 'Height of dialog box borders
smCYHThumb = 9 'Height of scroll box on horizontal scroll bar
smCXHThumb = 10 'Width of scroll box on horizontal scroll bar
smCXIcon = 11 'Width of standard icon
smCYIcon = 12 'Height of standard icon
smCXCursor = 13 'Width of standard cursor
smCYCursor = 14 'Height of standard cursor
smCYMenu = 15 'Height of menu
smCXFullScreen = 16 'Width of client area of maximized window
smCYFullScreen = 17 'Height of client area of maximized window
smCYKanjiWindow = 18 'Height of Kanji window
smMousePresent = 19 'True is a mouse is present
smCYVScroll = 20 'Height of arrow in vertical scroll bar
smCXHScroll = 21 'Width of arrow in vertical scroll bar
smDebug = 22 'True if deugging version of windows is running
smSwapButton = 23 'True if left and right buttons are swapped.
smCXMin = 28 'Minimum width of window
smCYMin = 29 'Minimum height of window
smCXSize = 30 'Width of title bar bitmaps
smCYSize = 31 'Height of title bar bitmaps
smCXMinTrack = 34 'Minimum tracking width of window
smCYMinTrack = 35 'Minimum tracking height of window
smCXDoubleClk = 36 'Double click width
smCYDoubleClk = 37 'Double click height
smCXIconSpacing = 38 'Width between desktop icons
smCYIcomSpacing = 39 'Height between desktop icons
smMenuDropAlignment = 40 'Zero if popup menus are aligned to the left of the memu bar item. True if it is aligned to the right.
smPenWindows = 41 'The handle of the pen windows DLL if loaded.
smDBCSEnabled = 42 'True if double byte characteds are enabled
smCMouseButtons = 43 'Number of mouse buttons.
smCMetrics = 44 'Number of system metrics
smCleanBoot = 67 'Windows 95 boot mode. 0 = normal, 1 = safe, 2 = safe with network
smCXMaximized = 61 'Default width of win95 maximised window
smCXMaxTrack = 59 'Maximum width when resizing win95 windows
smCXMenuCheck = 71 'Width of menu checkmark bitmap
smCXMenuSize = 54 'Width of button on menu bar
smCXMinimized = 57 'Width of rectangle into which minimised windows must fit.
smCYMaximized = 62 'Default height of win95 maximised window
smCYMaxTrack = 60 'Maximum width when resizing win95 windows
smCYMenuCheck = 72 'Height of menu checkmark bitmap
smCYMenuSize = 55 'Height of button on menu bar
smCYMinimized = 58 'Height of rectangle into which minimised windows must fit.
smCYSmCaption = 51 'Height of windows 95 small caption
smMidEastEnabled = 74 'Hebrw and Arabic enabled for windows 95
smNetwork = 63 'Bit o is set if a network is present.
smSecure = 44 'True if security is present on windows 95 system
smSlowMachine = 73 'True if machine is too slow to run win95.
End Enum
Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As SystemMetricConstants) As Long
Private Sub ResizeListView(ListViewControl As Control, Optional ByVal BoxWidth As Single = 0)
Dim I As Integer, W As Single, W0 As Single
If BoxWidth = 0 Then BoxWidth = ListViewControl.Width
W0 = BoxWidth - 4 - GetSystemMetrics(smCXVScroll)
W = W0 - ListViewControl.ColumnHeaders(2).Width - ListViewControl.ColumnHeaders(3).Width
ListViewControl.ColumnHeaders(1).Width = W
End Sub
Сейчас этот форум просматривают: Google-бот, SemrushBot и гости: 45