Scrolling question...

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!
 
J

Justin Rogers

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top