Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Const GWL_STYLE = (-16) Dim Style As Long Style = GetWindowLong(ListView1.hwnd, GWL_STYLE) Style = Style Or 3 SetWindowLong ListView1.hwnd, GWL_STYLE, Style
Option Explicit Private Declare Function EnableScrollBar Lib "user32" (ByVal hwnd As Long, ByVal wSBflags As Long, ByVal wArrows As Long) As Long Private Const SB_HORZ = 0 Private Const ESB_DISABLE_BOTH = &H3 Private Sub Command1_Click()EnableScrollBar ListView1.hwnd, SB_HORZ, ESB_DISABLE_BOTHEnd Sub
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_STYLE = (-16)
Dim Style As Long
Style = GetWindowLong(ListView1.hwnd, GWL_STYLE)
Style = Style Or 3
SetWindowLong ListView1.hwnd, GWL_STYLE, Style
Private Declare Function EnableScrollBar Lib "user32" (ByVal hwnd As Long, ByVal wSBflags As Long, ByVal wArrows As Long) As Long
Private Const SB_HORZ = 0
Private Const ESB_DISABLE_BOTH = &H3
Private Sub Command1_Click()EnableScrollBar ListView1.hwnd, SB_HORZ, ESB_DISABLE_BOTHEnd Sub