Hello all,
I am trying to modify the width of the vertical scrollbar on my datagridview by using the following code :
Dim fi As Reflection.FieldInfo = myDataGridView.GetType.GetField("vertScrollBar", Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.Instance) Dim vsb As VScrollBar = CType(fi.GetValue(myDataGridView), VScrollBar) vsb.Width = 50
In the debugger, on the second line of code, I can see that the vsb object is indeed the vertical scrollbar. Its original width is 21.
But when the third line of code is executed, the value of the width is never changed. After execution, the width of vsb is always 21!
What's wrong ??
Thanks