Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printers and VFP
Message
De
23/08/1999 01:22:23
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00255437
Message ID:
00256462
Vues:
27
>>>>>Hi all,
>>>>> I have some reports that use @ say commands as opposed to the report writer. Some reports just can't be done with the report writer. I'm trying to add a feature to allow users to select which printer to send reports to. Bsically I'm using the Fox function GetPrinterand making API calls to GetProfileString, WriteProfileString, and SendMessage to change the default printer temporarily, then set it back after the report runs. When I change the printer and use sendmessage to notify all apps that the default printer changes IE, Word, etc.. prints to the correct printer.. BUT VFP doesn't seem to notice I changed printers.. Maybe I'm going at this the wrong way.. not sure.. Help!
>>>>>
>>>>>TIA!
>>>>
>>>>Have you tried:
>>>>
>>>>SET PRINTER TO NAME (GETPRINTER())
>>>
>>>Yes.. If yuo pick anything other than the default printer it does nothing.. if you pick the default.. it prints fine..
>>
>>PMFJI: We use @SAY to print checks, and SET PRINTER TO NAME ("&xxx.") to re-direct the printer, and its fine. Don't want to insult you, but are you also doing "SET DEVICE TO PRINT" before and "SET DEVICE TO SCREEN" after? Also, try doing this: xxx = GETPRINTER() then SET PRINTER TO NAME ("&xxx.") - just like this -- macro in quotes and parentheses might do the trick for you.
>>
>>Beware: GetPrinter() gets the printer by NAME as shown in the Print Manager window -- and is different for different users if they decided to 'rename' their printer icons to 'be more logical' or some such...
>>
>>HTH
>>
>>Rob
>
>I think you should try the common dialog box!!!

Hi Emmanuel:

Not sure what that would do for me that GetPrinter() does not... I would still need to do the SET DEVICE/SET PRINTER TO/etc. stuff inside the code. Do you mean the MS Active-X control? Please explain. If there's an easier way, I'm all ears.

Rob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform