Scrolling question...

  • Thread starter Thread starter craig
  • Start date Start date
C

craig

I have two questions that I was hoping to get some input on:

1. How can I synchronize the horizontal scrolling of two controls on my
form? I realize that I will have to use the Windows API to do this, but I
haven't been very successful in determining exactly how. Are there any good
API references for .NET developers?

2. What would be the most efficient way to paint the background of a
scrollable user control in such a way as to suggest columns (using lines or
vertical bars of color, etc.) ?

If anyone can point me in the right direction, I would really appreciate it!

Thanks!
 
You can forward messages from one control to the next by overriding the
WndProc... You can easily do this by setting the *peer* control as a property
on each of the controls. Then they'll change the Message items and forward
them over to the peer control. In this way they can both scroll simultaneously.

In this manner you don't need any Win32 APIs... See Bob's info for your
other question.
 
Back
Top