Home » Community » Newbie corner » Printer's dialog shows up multiple times
Printer's dialog shows up multiple times [message #45471] |
Sat, 21 November 2015 11:39 |
Giorgio
Messages: 218 Registered: August 2015
|
Experienced Member |
|
|
Hi there,
I have this weird problem I can not fix. I developed an application with Ultimate++ interacting with a MySQL server. Basically there is a main window where user put some data and then save them in a SQL server. After some time the same user click on a button, a window opens and he puts some additional data. After doing that user clicks on a button to print those data on a label (the button is not on the main window, is on the window where user puts additional data) and finally clicks on a button to update the record on the SQL server with the additional data and comes back to the main window. The problem is on the print part of the workflow.
First time the user clicks on the print button, the printer's dialog window shows up (this is not a window created by me, is the standard window used by the operating system / printer's driver to manage printing), user clicks ok and the label is printed. When user creates a second record and has to print the label, he clicks the print button, printer's dialog shows up, he clicks ok, label printed BUT printer's dialog shows up again, so user clicks cancel and then can come back to normal operation. Third time user clicks on print button, the printer's dialog pops up three times: first time ok, then cancel, then cancel. I think you got where this is going: 4th label printed printer's dialog pops up 4 times, 5th 5 times and so on. If user completely exits the application, the "counting" of printer's dialog begins again from one.
My printing code is based on this example.
I thought that this was somehow related to the fact that I do not destroy the printer job after printing, but when I try to put a "delete pj;" line in my code it does not compile.
Please help me on fixing that, the application is unusable with this bug.
Thanks,
Giorgio
|
|
|
Goto Forum:
Current Time: Thu May 16 19:10:42 CEST 2024
Total time taken to generate the page: 0.02808 seconds
|