编写事件处理程序以处理事件 [英] write eventhandler to handle events

查看:98
本文介绍了编写事件处理程序以处理事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在编写一个基于gui的小型应用程序,我需要处理插入HDD时发生的事件.

我知道事件的名称,但问题是如何在应用程序中处理该事件?

在C#中这可能很容易,但是作为C#的初学者,这对我来说是一个巨大的挑战.

任何建议都将受到高度赞赏!

谢谢
Abid

Hi,

I am writing a small gui based application where I need to handle the event occured while inserting HDD.

I know the name of event, but the question is how do I handle that event in my application?

This might be easy in C#, but being a beginner in C# it is a big challenge for me.

Any suggestions are highly appreciated!

Thanks
Abid

推荐答案

C#中的事件和事件处理 [ ^ ]文章可能


也请阅读以下更好的添加处理程序样式:
Also read this, better style of adding handlers: how to call keydown event on particular button click[^]

—SA


尝试以下链接:检测USB在C#程序中删除驱动器 [ ^ ]
Try this link: Detecting USB Drive Removal in a C# Program[^]


这篇关于编写事件处理程序以处理事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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