I am using the IE web browser control in my app - and Im exectuting a print command using ExecWB as follows:
Is there a good way to tell when the print dialog that appears is closed, i.e. user hits ok or cancel? The ExecWB function doesnt produce any value, so I cant find a way to hook into the dialog result. Additionally Ive thought about running a loop to wait for my program window to return to focus, but thats not solid since it would trigger if the user accidentally clicked back on the program window prior to selecting anything in the print dialog.
Any help would be appreciated! Thanks!
-Falcon
Code:
webBrowser.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER)
Is there a good way to tell when the print dialog that appears is closed, i.e. user hits ok or cancel? The ExecWB function doesnt produce any value, so I cant find a way to hook into the dialog result. Additionally Ive thought about running a loop to wait for my program window to return to focus, but thats not solid since it would trigger if the user accidentally clicked back on the program window prior to selecting anything in the print dialog.
Any help would be appreciated! Thanks!
-Falcon