sohaibi Posted March 14, 2005 Posted March 14, 2005 Does anyone know how to color the scrollbars of the ListView in C#.NET? I had done it in VC by hooking the "WM_CTLCOLORSCROLLBAR" message in the window message function :D . I have tried it in C#.NET like this: private const int WM_CTLCOLORSCROLLBAR = 0x0137; protected override void WndProc(ref Message m) { if(m.Msg == WM_CTLCOLORSCROLLBAR) { IntPtr l_nHdcScrollbar = m.WParam; Graphics l_oGraphics = Graphics.FromHdc(l_nHdcScrollbar); l_oGraphics.Clear(Color.Blue); } base.WndProc (ref m); } But its not working. I have also tried to debug it. While execution there are a lot of messages coming but not "WM_CTLCOLORSCROLLBAR" :( . This is my first post to xtreme .NET Talk. Hope i'll get quick responses! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.