August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!
The first time this Function is called it is false(this is correct)
Const GWL_STYLE = (-16) Const WS_VSCROLL = &H200000 Const WS_HSCROLL = &H100000 Private Declare Function GetWindowLong Lib "user32" _ Alias "GetWindowLongA" ( _ ByVal Hwnd As Long, _ ByVal nIndex As Long) As Long '================================================================== Public Function IsHScrollVisible(Hwnd As Long) As Boolean Dim Style As Long Style = GetWindowLong(Hwnd, GWL_STYLE) If (Style And WS_HSCROLL) Then IsHScrollVisible = True Exit Function End If End Function '================================================================== Public Function IsVScrollVisible(Hwnd As Long) As Boolean Dim Style As Long Style = GetWindowLong(Hwnd, GWL_STYLE) If (Style And WS_VSCROLL) Then IsVScrollVisible = True Exit Function End I End Function Sub PositionForm_Grid gridStats.Width = 12184 If IsVScrollVisible(gridStats.Hwnd) = False Then gridStats.Width = 11800 End If
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.