Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

datagridview Scroll width color

i want to change both Scroll bars colors and width  with datagridview
5 seconds with google got me this --> https://www.codeproject.com/Messages/325...l-bar.aspx
I never really done it but looking at that post the code should work.
Gl

<3
i convert c# to vb.net

the code not work

the code became
 

Code
Private Sub foo()
       Dim g = New DataGridView()
       ToString()
       g.Controls(0).BackColor = Color.Red
   End Sub
 

   Private Sub DataGridView1_Scroll(ByVal sender As Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles DataGridView1.Scroll
       foo()
       ' g.Controls(0).BackColor = Color.Red
   End Sub
End Class

Public NotInheritable Class Util
   Private Sub New()
   End Sub
   Public Shared Function Find(Of T As Control)(ByVal container As Control) As T
       For Each child As Control In container.Controls
           Return (If(TypeOf child Is T, DirectCast(child, T), Find(Of T)(child)))
       Next
       ' Not found.
       Return Nothing
   End Function
End Class


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by Nemo2478Jul 25, 2020 12:01 PM 1 179 Jul 25, 2020 12:01 PM
Last Post: glitchgxd
[.NET] by Takehito MorokuzuJun 9, 2019 03:51 PM 2 220 Jun 9, 2019 03:51 PM
Last Post: Hawk HF
[.NET] by AjummaDec 29, 2018 11:04 AM 6 294 Dec 29, 2018 11:04 AM
Last Post: Fanus47213