Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Printer's Device Context Handle
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00088451
Message ID:
00088714
Vues:
29
George,

Thanks a lot for the procedure for getting the printer handle. Even though the hDC variable is being set, Griffin's Text Controller is not working as designed. Oh well, they said there were no guarantees that it would work with Visual FoxPro. Unless there's another text controller OCX out there for FoxPro, one that offers basic word processing abilities (bold, font, point, etc.), then we'll need to build our product in Visual Basic.

Thanks again for your help!

Michael Reynolds
herbalst@west.net


>>Greetings!
>>
>>We are using the Griffen Technologies TX Text Controller v5.52 and are having trouble printing. Apparently, the OCX needs to talk directly to the printer port and must have the integer handle for the printer device.
>>
>>The syntax would be something like:
>>
>> TXTextControl1.PrintDevice = Printer.hDC
>> TXTextControl1.PrintPage(n)
>>
>>This OCX was designed with Visual Basic in mind and, from what I can see, VB can print by grabbing the device handle. Can FoxPro do this, too? Any assistance would be most appreciated. (We're also awaiting feedback from the developer.)
>>
>>Michael Reynolds
>>herbalst@west.net
>
>Try this:
>
>DECLARE INTEGER CreateDC IN Win32API;
>  STRING @lpszDriver, STRING @lpszDevice,;
>  STRING @lpszOutput, STRING @lpInitData
>hDC = CreateDC('WINSPOOL', lcPrinter, 0, 0)
>
>In the above lcPrinter is the name of the printer (as it would appear in the first column of the array returned by APRINTERS()).
>
>hth,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform