Vb.net – Determine if a DataGridView’s horizontal scroll bar exists

.net-3.5datagridviewscrollbarvb.net

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.

Best Solution

Try this:

dgvYourDataGridView.Controls.OfType(Of HScrollBar).SingleOrDefault.Visible

Related Question