Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在启动 winform 程序时按下一个键。我想在程序启动过程中阅读这个键盘输入。我怎样才能做到这一点?
将表单的KeyPreview设置为True,并将代码添加到表单的KeyPress或KeyDown事件中。