Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have developed a custom Form designer by using which I can create a form with multiple custom controls. I have also developed undo/redo feature on this form editor using UndoEngine class.

When UndoEngine is enabled and user deleted a control from a tabpage it actually calls MenuCommandService.Invoke() method over the standard delete commandID. And this API actually taking long time to invoke the dispose method of the custom control causes form editor to hang.

Please suggest any solution for this problem. Thanks!



Thanks,
Kumar

What I have tried:

I tried calling the invoke() method in separate thread but of no use.
i tried getting the handle of the actual object and calling host.destroycomponent(object).
I tried calling the Invoke() method asynchronously.
Posted
Comments
Ralf Meier 14-Nov-17 4:21am    
With this little information I'm not able to make any Suggestion.
It is necessary to know how your Form-Designer works and also how you exactly act (or think that you act) if a Control is removed ...
BillWoodruff 14-Nov-17 20:54pm    
Why did you create something similar to VS' form designer ?

Are you aware of the limits of using the 'UndoEngine Class outside of Visual Studio:

https://stackoverflow.com/a/20585060/133321

We can't read your mind, or your screen

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