[英]How can I make a drawing surface so people can draw on my Windows Form application?
I'm making a simple chat program for me and my friends as a tech demo. 我正在为我和我的朋友制作一个简单的聊天程序,作为技术演示。 I had the idea to have a small drawing pad thing that would be shared between all connected users. 我的想法是有一个小的绘图板,可以在所有连接的用户之间共享。
What could I use in this situation (control wise)? 在这种情况下(控制方面)我可以使用什么?
I know I can convert an image to a byte[] and pass that to everyone, but I'd need to use a pictureBox to get said image. 我知道我可以将图像转换为byte []并将其传递给每个人,但是我需要使用pictureBox来获取所述图像。
Thanks for the help! 谢谢您的帮助! Doesn't have to be step by step instruction, just a guideline. 不一定要逐步说明,而只是一个准则。
There is lot more to write here that just passing arrays. 这里要传递的只是数组。 The syncing of the picture needs to be fast and passing array is not the best idea. 图片的同步需要快速,并且传递数组不是最好的主意。 Instead, try sending events to each chat client. 而是尝试将事件发送到每个聊天客户端。
There are many ways. 有很多方法。 You have to decide which is fast enough for you. 您必须决定哪一个对您来说足够快。
Study TightVNC's source code to gain in-depth knowledge. 学习TightVNC的源代码以获得深入的知识。 Here is the link. 链接在这里。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.