Synchronized Scrolling between C# applications

  • Thread starter Thread starter Roe
  • Start date Start date
R

Roe

What is the best way using C# .NET 1.1 to have two (or more)
applications perform a "synchronized" scrolling? These applications
will all be C# .NET and will be on the same machine. The effect I need
to create is if one program enables this "sync" feature, other
instances of this application will scroll in sync while the base one's
scroll bar is moved. Is remoting the best way to do this? Or is there
another way? I'm just concerned about the amout of messages that occur
on a scroll event.
Thanks in advance.
 
If this is only supposed to sync one way then it would be possible to on
scroll, send a windows message to the other application to cause it to scroll
too. I'm not sure exactly what the code would look like but it sounds
reasonable to me. I'm sure there are some people more familiar with Win32 to
shed some light.

Ciaran O'Donnell
 
So, is it possible to use windows messaging via .NET? That was
something I was wondering about.
 
Hi,

It is possible, but you need to use one of the SendMessage or PostMessage API
functions, AFAIK:

[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr window, uint message, IntPtr
wparam, IntPtr lparam);
 

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

Back
Top