What would be the best way to continuously send the mouse position to another computer in C#?
So far I use a TCP socket for transportation. I get the ToString()
of MousePosition
, convert it to byte[]
and send that byte array. On the receiving side I append the bytes to a StringBuilder, parse it and construct a new point. At least it works :-)
I'm new to .net (though I know some Java) and I think there is a better way.
Can one serialize / deserialize a System.Drawing.Point
in some (elegant) way? Can one send this serialized object to a remote machine? And if so, how?
Regards
Mike
[;-)