FastReport steals focus from other apps
We have developed a PrintServer that is using FastReport. The PrintServer loads a FastReport file and a lot of XML data files and prints it to a printer.
The PrintServer is running in the taskbar. The problem is that when the funtion PrintPrepared is executed the application that does have focus (for example Word) looses focus for a second, for every print. That is very annoying. It makes it impossible to use the PC for other applications while FastReport is busy with printing.
How do I prevent that FastReport steals the focus from other apps?
I have already set the ShowProgress to false, before the PrintPrepared:
Config.ReportSettings.ShowProgress = false;
When I remark the line PrintPrepared the PrintServer did not steale the focus anymore. But, that is not what we wanted ;-)
Tia
Hans
Using version 1.3.51.
The PrintServer is running in the taskbar. The problem is that when the funtion PrintPrepared is executed the application that does have focus (for example Word) looses focus for a second, for every print. That is very annoying. It makes it impossible to use the PC for other applications while FastReport is busy with printing.
How do I prevent that FastReport steals the focus from other apps?
I have already set the ShowProgress to false, before the PrintPrepared:
Config.ReportSettings.ShowProgress = false;
When I remark the line PrintPrepared the PrintServer did not steale the focus anymore. But, that is not what we wanted ;-)
Tia
Hans
Using version 1.3.51.
Comments
Once you have disabled the progress window, there will be no more UI operations that may steal the focus. Try to replace PrintPrepared call with the following code (prints a test page on a default printer, using the standard printing means also used in FastReport):
If this code steals the focus too, we will not be able to fix this issue.
Problem seems to be in a printer that is used for ActiveFax.
When I print the reports to a normal printer focus is not stolen.
Thanks for your help.