H-Scrollbar
Posted: 22 Oct 2008, 21:20
Dear Timo,
after a long break due to healthy problems, I recently started VB6-programming again. Right now I work on several projects in which the ExplorerTreeView plays a major role. I would like to get rid of the horizontal scrollbar and tried it with following code (VB6/SP6, WinXP/SP1):
Private Sub Command1_Click()
Dim R As Rect
Dim Style As Long
'Toggle H-ScrollBar
Style = GetWindowLong(ETV.hWnd, GWL_STYLE)
If (Style And WS_HSCROLL) Then
Style = Style - WS_HSCROLL
Else
Style = Style Or WS_HSCROLL
End If
SetWindowLong ETV.hWnd, GWL_STYLE, Style
GetWindowRect ETV.hWnd, R
SetWindowPos ETV.hWnd, 0, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, SWP_FRAMECHANGED
ETV.SetFocus
End Sub
The Result is an empty ExplorerTreeView (Version 1.14.1/857), except the toolbox bitmap. Do you have any idea how to realize my wish?
Thanks in advance an best regards
aka
after a long break due to healthy problems, I recently started VB6-programming again. Right now I work on several projects in which the ExplorerTreeView plays a major role. I would like to get rid of the horizontal scrollbar and tried it with following code (VB6/SP6, WinXP/SP1):
Private Sub Command1_Click()
Dim R As Rect
Dim Style As Long
'Toggle H-ScrollBar
Style = GetWindowLong(ETV.hWnd, GWL_STYLE)
If (Style And WS_HSCROLL) Then
Style = Style - WS_HSCROLL
Else
Style = Style Or WS_HSCROLL
End If
SetWindowLong ETV.hWnd, GWL_STYLE, Style
GetWindowRect ETV.hWnd, R
SetWindowPos ETV.hWnd, 0, R.Left, R.Top, R.Right - R.Left, R.Bottom - R.Top, SWP_FRAMECHANGED
ETV.SetFocus
End Sub
The Result is an empty ExplorerTreeView (Version 1.14.1/857), except the toolbox bitmap. Do you have any idea how to realize my wish?
Thanks in advance an best regards
aka