Click here to Skip to main content
15,901,373 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 19-Nov-13 22:07pm
v2

1 solution

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

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

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


Hope this helps.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900