Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping FP in the background when printing report
Message
De
29/10/2001 14:09:12
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00571206
Message ID:
00574656
Vues:
26
>>>>I have a VFP application I wrote that runs in the background and prints reports whenever the appropriate data files appear in its data directory. The data files come from a C++ app. The problem I am seeing is that when the report runs the VFP desktop comes to the front. Is there a way I can make sure the desktop stays minimized while the app runs? Is it also possible to keep the "Printing..." window hidden? If the latter is not possible then the former will suffice.
>>>
>>>See Message #542800 for how to hide "Printing..." window.
>>>
>>>>For what it's worth, right before I run the report I display a couple messages on the VFP desktop. Does that cause the VFP window to come to the front?
>>>
>>>Comment out the code that shows those messages and run app again :)
>>
>>I commented out the displayed messages and I even made sure that
>>_SCREEN.WindowState = 1
>>and still the VFP desktop comes up when the REPORT command is issued. I traced through the code in the debugger and, sure enough, only when the REPORT command is executed does the desktop get restored. I can re-minimize after the report but this would still be very distracting. I'll take a look at the message mentioned for the "Printing..." window issue but I imagine it will have the same effect.
>
>Just a SWAG, maybe you can hide VFP desktop by specifying _scren.Top = -1000 and _Screen.Left = -1000?

I have just been working on that approach with some success. I specified _SCREEN.Left = 1300 since I know that the only computers this is run on will not have higher than 1280 horizontal resolution specified and only one monitor will be used. This way I don't even have to minimize the screen and I can display anything I want using ? commands. If I actually want to see the screen I just right-click on the taskbar icon and specify Maximize and the screen fills up the monitor where I can view the status of everything. When I am done I can then Restore the screen and it goes back past the right edge of the screen.

Even though the _SCREEN.Left has been moved away the "Printing..." window still shows up but it isn't nearly as distracting and it often just appears behind other windows. If it becomes a problem I will investigate using the article you referenced earlier.

Thanks for the ideas.
Larry Huisingh
Lockheed Martin Information Technology
Richland WA USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform