HighTechTalks DotNet Forums  

question about IComponentChangeService.ComponentAdding

Dotnet Framework (WinForms DesignTime) microsoft.public.dotnet.framework.windowsforms.designtime


Discuss question about IComponentChangeService.ComponentAdding in the Dotnet Framework (WinForms DesignTime) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
grace lee
 
Posts: n/a

Default question about IComponentChangeService.ComponentAdding - 11-22-2007 , 04:52 AM






I have a query regarding cancelling the
IComponentChangeService.ComponentAdding event. I have an add-in that gets a
reference to the IDesignerHost windows, and then hooks into the
ComponentAdding event. Inside the ComponentAdding event I sometimes want to
be able to cancel the adding of a particular component. According to the
MSDN documentation "You can cancel the process of adding a component by
throwing an exception here". If I throw an exception inside this event
handler, although it does cancel the adding of the control, I get a
messagebox showing the exception message and OK button. I am wondering how
to cancel the adding of the control without poping up such a message?


thanks a lot :-)



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.