Problems with Printer in VB4 
Author Message
 Problems with Printer in VB4

I do know what you are talking about. I had the same problems to. The
following code will work

Printer.Print
Printer.FontName = "Arial"
Printer.FontSize = 11
Printer.Print "Dette er en test."
Printer.EndDoc

It seems that you have to send "nothing" to the printer object before
you can change the font. Don't ask me why!!

Hope this helps!

Quote:
>I am using VB4 and am having problems with the printer: namely, if I
>change a font or other attribute using Printer.Font.Name = XXX for
>instance, the output remains unchanged. Here's the particular code I am
>using:
>Printer.Font.Size = 8
>Printer.Font.Name = Printer.Fonts(varPrinterFont)   'to make sure
>it's valid
>Printer.Font.Size = 8 'I read somewhere that under certain circumstances
>you need this line *twice* for some strange reason, hence above
>Printer.Font.Italic = True
>Printer.CurrentX = varOffsetX
>Printer.CurrentY = varOffsetY
>Printer.Print "BlahBlahBlah"
>All that happens is the printer uses it's usual font, with no italics
>etc. If I then use
>Debug.Print Printer.Font.Name
>then VB claims that the printer is using a *different* font, ie the one
>I have tried to allocate, than the one which the printer is clearly
>printing in.
>I have also tried using
>Printer.FontName = XXX
>etc. which has much the same effect (some books seem to claim that
>Printer.Font.Name is correct, and others suggest you use
>Printer.FontName - which is recommended?).
>Occasionally the printer has responded but the results have been erratic
>to say the least, and unreproducable. For instance, the printer will use
>Italics as suggested but will keep the font size the same, and will
>suddenly start underlining for no obvious reason.
>I am using a HP Deskjet 560C but have found the same lack of
>co-operation when using an HP Laserjet 4L. Is this a problem with HP or
>a general fault? Or is it just me being stupid?
>Thanks for your help. Please reply via e-mail as my News reading s/w is
>temperamental.
>-dave

Ulf Erik Forsbakk



Tue, 01 Sep 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem with printer in VB4

2. VB4 Printer Font Selection Problem

3. VB4.0 Change Printer Problem

4. Problems with printer object in VB4

5. VB4 / WIN95 / Printing Problem Non PostScript Printer

6. URGENT:printer problems in vb4

7. Printer/Font problem in vb4.0

8. Q: VB4 memory and printer problems

9. VB4: Printer.font.name problem

10. Problem : my printer (HP660C) don't work with VB4

11. Problem setting the active printer of Word 97 without changing the Windows default printer

12. problems printing on a zebra printer with printer.print

 

 
Powered by phpBB® Forum Software