简体   繁体   中英

C# WPF: webbrowser modal dialog close from win32 app

I am curious as to if this is even possible, but basically what I need is when opening a System.Windows.Forms.WebBrowser Modal Dialog from a WPF application I need to catch a value passed back from the page to WPF and keep a window up or close it based on the value that I return. Is this even possible or am I going to have to about in a different way?

Thanks, Andrew

surely is possible, just create the dialog, register an event handler for a custom event you have created in your second form and show it as modal, then inside your form you do what you need to do and when something happens you fire the event the main form has registered to, in the custom EventArgs class used in your event you can pass the value main form needs to get. from the main form you check the value and you do nothing or close the popup....

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM