加上WS_THICKFRAME风格,比如: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) Private Const WS_THICKFRAME = &H40000Private Sub Form_Load() Me.List1.AddItem "1111" Me.List1.AddItem "2222" SetWindowLong Me.List1.hwnd, GWL_STYLE, GetWindowLong(Me.List1.hwnd, GWL_STYLE) Or WS_THICKFRAME End 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)
Private Const WS_THICKFRAME = &H40000Private Sub Form_Load()
Me.List1.AddItem "1111"
Me.List1.AddItem "2222"
SetWindowLong Me.List1.hwnd, GWL_STYLE, GetWindowLong(Me.List1.hwnd, GWL_STYLE) Or WS_THICKFRAME
End Sub
提示:编译错误,方法和数据成员未找到应该是hwnd这里有问题SetWindowLong Me.List65.hwnd