Hi All,
I would like to know if there is any way to perform printing asynchronously. I am facing an issue where the application crashes on pbdwe.dll when the user clicks print and closes the window before the printing process completes, which is happening in the background.
I am considering separating the printing process from the window to make it independent (asynchronously).
Our application, built on PB 2022 Build 1892, crashes when the user prints (using 'print immediate') and closes the window.
We have analyzed the issue and tried some solutions,
1. Including disabling the close button and control menu (which worked but doesn't seem like the best solution),
2. Creating a popup window to display during the printing process (which we close once the printing is completed),
3. and using an instance Boolean variable to track whether printing is happening or not, and allowing the screen to close if the user chooses to do so.
However, all of these attempts still result in a crash if the application is closed during the printing process.
Looking for any ideas, suggestions, or guidance from anyone who has faced the same issue.
Thank you
Sathishkumar.
Thank you I will try as you suggested.
Thanks & Regards
Sathishkumar
That seems like a good approach to prevent these kinds of issues.
However when I set the main window to enabled=false at runtime, while the time the print cancel dialog is shown, the last active application (be that Outlook, Word, Explorer, another instance of our application) is shown on top of the active application. If I print multiple documents, display switches back and forth between the active application and previous window.
Do you know of a way to prevent this from happening (short of disabling the print cancel dialog)
You can try the TopMost! option in the <Window.>.SetPosition ( ) command.
Note: Don;t forget to reset the position though after the long process is completed. ;-)
Regards ... Chris