May 21st, 2013, 10:29 AM
Determine if a DataGridView's horizontal scroll bar exists?
Visual Basic 2010, .NET 3.5 Is there a way to pragmatically determine if a DataGridView's horizontal scroll bar is active or visible? I need to move a few items about when the DGV's horizontal scroll bar comes on
May 21st, 2013, 04:25 PM
Re: Determine if a DataGridView's horizontal scroll bar exists?
I played around with this and figured out how to determine if a scroll bar is visible, a horizontal scroll bar in the example below.
Private Function HScrollBarVisible() As Boolean
Dim ctrl As New Control
For Each ctrl In DataGridView1.Controls
If ctrl.GetType() Is GetType(HScrollBar) Then
If ctrl.Visible = True Then
Tags for this Thread
Click Here to Expand Forum to Full Width