Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two questions
Message
De
14/06/1998 11:37:20
 
 
À
14/06/1998 06:10:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00107979
Message ID:
00108003
Vues:
39
>HI,
>
>Is there a way to create a report that gives the same layout results on different printers ?
>Now when i create a report for a deskjet printer, and it is printer on a laser, there are changes to the layout (mostly the margins)
>

I can't answer this one for sure but my gut tells me its out of our hands how a printer handles the report. What you can do is write more than one copy of a report, and check the printer before sending, and decide from there which report to send. Or, if you are comfortable hacking frx files, you could modify the hpos and vpos fields prior to sending the report.

>How can i prevent a use to start a program more than once on a computer ?
>
>Marc

There are a couple of ways to do this: The first is by using the windows API to check for existing windows with the same caption your application has. This is not my favorite, because we often change the main caption on our applications. I believe there is sample code for this technique here in the files section.

Another way is to plant a file in a known directory when the application is run, and check for the existence of that file before you let your app start. If the file is there, there is another instance running, and you shutdown. This one also has its limitations, in that you are in danger if your app shuts down improperly, and the file gets left behind.

The third (and IMO best) is to ping your app with DDE on startup, and if the ping is successful, the application is running. There is also sample code here to do this.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform