I am working on winform application where I need to display a popup. I am currently doing it with ShowDialog() method. but due to change in requirement, I want to show it as non-dialog. So I have used show() method instead of showDialog().
my popup window is using windows webBrowse control as one of its child control.
my problem is when I use showDialog() method, everthing works fine. but when I use show() method, and close the popup (once user is done with his work), show method() somehow calling dispose method of webBrowse control and this is preventing me to relaunch same popup again and giving me "Cannot access a disposed object" error.
Is this expected behavior in show() method or webBrowse control. if yes, then how Can I resolve it.
Note: PopUp dialog box is injected in presenter using DI so cannot inject popup after every dispose.
Thanks in advance.