识别C#或VB中的引发弹出窗口或消息框 [英] Idenify raise popup window or messagebox in c# or vb

查看:187
本文介绍了识别C#或VB中的引发弹出窗口或消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想在运行我的程序的同时创建一个Raise消息框或弹出窗口的日志文件.
意思是说散文,如果有任何消息框或弹出ID提升,那么我想识别该弹出窗口并将其详细信息保存在数据库中.

Hi,
I want to create a log file of Raise message box or popup window durying my my program is run.
Means durying of prosess , if there is any message box or pop id raise then i want to identify that popup and save its detail in database.

推荐答案

您好,
我不知道您使用的是哪种类型的应用程序.因此,我已经在WPF和使用C#的窗口应用程序中进行了解释.

Hi,
I don''t know what type of application you are using. So I have explained in both WPF and window application using C#.

AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);



当您在应用程序中未处理任何异常时,将调用此事件.

而下面的另一个事件将被称为天气,否则您将无法处理该异常



This event will get called when you have not handled any exception in you application.

and the below one more Event it will be get called weather or not you have handled the exception

AppDomain.CurrentDomain.FirstChanceException += new EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>(CurrentDomain_FirstChanceException);



希望这会有所帮助.



Hope this helps.


这篇关于识别C#或VB中的引发弹出窗口或消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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