Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting print mode (Landscape vs. Normal) programmatical
Message
 
 
À
08/04/2003 16:10:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00775228
Message ID:
00775239
Vues:
16
Great link, Tracy. I will check, if this example could be easily converted into VFP code. I would be also interested, where are the printer codes online and how do you send them? Using ??? syntax?

Thanks again.

Well, I checked the code and see, that it uses Printer.hDC, which doesn't have analogue in VFP. It also uses a simple structure.

So, perhaps solution should be to create a VB COM.

I even now remembered about something like that in Downloads section VBPrinter, which I didn't try to use.

>Update: here is an example but it is in VB:
>
>http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvbtips/html/msdn_msdn116.asp
>
>
>If it is a report, you could edit the frx programmatically. We do this in our programs for different reasons. We copy the frx to a temporary file and change the settings we need to and run the temp file frx instead of the original in code. Other than that, the only way I know of is to send the printer control codes to the printer using ??? in code which is dependent on your printer, although many printers accept standard hp LJII, IBM, or Epson codes. All of our laserjets and ink jet printers accept LJII codes and all of our dot matrix printers accept Epson or IBM codes. For sending printer control codes, I did cheat and pull most of them from the prntcode.dbf that came with FPD26.
>
>As I think about this a bit more, it seems there should be an API that you could call to do this...
>
>>Hi everybody,
>>
>>Do you know, how can I set printer mode programmatically either Landscape or Normal? I would prefer to have a general approach and not printer specific codes...
>>
>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform