Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to disable quit button from dialog unhandled exception
Message like this:

unhandled exception has occurred in your application. if you click continue, the app will ignore this error and attempt to continue. If you click Quit, the app will close immediately.

I don't need quit button and I want to disabled it.

Thanks
Posted

Try this:
try
{
   //your code here...
}
catch(Exception ex)
{
   Button1.Enabled = false;
}


Please mark as answer if this solved your problem

-Eduard
 
Share this answer
 
Try to put your code in Try...Catch block
VB
Try
    'Your code goes here
Catch ex As Exception
    MessageBox.Show(ex.Message)
End Try

If you don't want any message on error then don't write anything in Catch Section.It will simply ignore the error and run further code.:)
But always remember that this is not good programming :(.Your code should be error free.
 
Share this answer
 

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