问题描述
大家好,
我遵循了本教程
https://www.youtube.com/watch?v= 2sCpd1HEMZw
我已经成功地在c#中创建了远程桌面查看器有这种担心,我如何使用图片框捕获鼠标和键盘事件 ?
I have been successful in creating a remote desktop viewer in c# now i have this worry, how do i get to use the picturebox to capture mouse and keyboard events ?
新手...需要帮助.
推荐答案
谢谢您在这里发布.
对于您的问题,以下事件会有所帮助.
For your question, the events below would be helpful.
>> 使用图片框捕获键盘事件
KeyDown : 此 API支持产品基础结构,不能直接在您的代码中使用.在控件具有焦点时按下键时发生.
KeyDown: This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when a key is pressed when the control has focus.
KeyPress : 此 API支持产品基础结构,不能直接在您的代码中使用.在控件具有焦点时按下键时发生.
KeyPress: This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when a key is pressed when the control has focus.
KeyUp : 此 API支持产品基础结构,不能直接在您的代码中使用.当控件具有焦点时释放键时发生.
KeyUp: This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when a key is released when the control has focus.
>> 使用图片框捕获鼠标事件
MouseCaptureChanged , MouseClick , MouseDoubleClick , MouseDown , MouseEnter ,鼠标悬停,鼠标离开, MouseMove , MouseUp ,鼠标轮.
MouseCaptureChanged, MouseClick, MouseDoubleClick, MouseDown, MouseEnter, MouseHover, MouseLeave, MouseMove, MouseUp, MouseWheel.
我希望这会有所帮助.
最好的问候,
温迪
这篇关于远程桌面应用程序中的C#捕获键盘输入/鼠标捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!