远程桌面应用程序中的C#捕获键盘输入/鼠标捕获 [英] C# Capture Keyboard input / Mouse Capture in Remote Desktop Application

查看:502
本文介绍了远程桌面应用程序中的C#捕获键盘输入/鼠标捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我遵循了本教程

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.

此 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 MouseDown MouseEnter 鼠标悬停鼠标离开 MouseMove MouseUp 鼠标轮.

MouseCaptureChanged, MouseClick, MouseDoubleClick, MouseDown, MouseEnter, MouseHover, MouseLeave, MouseMove, MouseUp, MouseWheel.

我希望这会有所帮助.

最好的问候,

温迪


这篇关于远程桌面应用程序中的C#捕获键盘输入/鼠标捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆