Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,
I was created a windows application to block the applications in pc. The application blocking was done but when clicking on blocked applications, the system generating a dialog box saying "The operation has been cancelled due to restrictions in effect on this computer. please contact system administrator". My need is i dont want to display this dialog box to user. how can i disable it.

Thank you,
psk
Posted
Comments
[no name] 11-Dec-12 1:19am    
not so sure but use Try Catch block...

1 solution

These are the exceptions that the underlying code or APIs are throwing to the calling code. Using Try Catch block you can catch specific exceptions and display custom messages to the end users, You can use the system generated messages as part of the stack trace for further debugging purpose.

If you don't want to display any messages, then you swallow all exceptions in the catch block. But this is not a good practice.
 
Share this answer
 
Comments
psk1305 11-Dec-12 2:09am    
Blocking was done in system registries and how can i catch the error in my program. iam just saving the application in registries and the blocking process is in registry
Kiran Susarla 11-Dec-12 2:20am    
Do you mean you are blocking the application through your application and then when you start any of these blocked applications, you are getting this message?
psk1305 11-Dec-12 2:34am    
yes kiran
Kiran Susarla 11-Dec-12 3:01am    
I don't think you can block or modify the messages that OS is generating unless you are calling them through your code. In your case you have informed the OS that a particular app is blocked. Now when OS is starting this app, it recognizes that app is blocked and it is throwing an error.

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