PDA

Click to See Complete Forum and Search --> : Printer Backcolor and Forecolor?


nicky
Jan 21st, 2000, 05:03 AM
How do I print the black text (forecolor) in the gray box (backcolor) on the paper.

Here is my code. (This is not working.)

Printer.DrawWidth = 5
Printer.FillColor = &H808080
Printer.FillStyle = 0
Printer.FontTransparent = True
Printer.ForeColor = vbBlack
Printer.Print "Hello this is a test"
Printer.Line (0, 300)-(1000, 200), &HC0C0C0, B

nicky
Jan 21st, 2000, 06:36 AM
Please help me with the above problem. Thank you very much.

LG
Jan 21st, 2000, 12:01 PM
Hi, Nicky.

Printer.DrawWidth = 5
Printer.FillColor = &H808080
Printer.FillStyle = 0
Printer.ForeColor = vbBlack
Printer.FontTransparent = True
Printer.Print ""
Printer.Print "Hello this is a test"
Printer.Line (0, 500)-(1400, 200), &HC0C0C0, B
Printer.EndDoc

Larisa

nicky
Jan 22nd, 2000, 01:54 AM
It's not working!

Please help me asap!

Thanks very much!

nicky
Jan 24th, 2000, 01:25 AM
Please help me!!!!

LG
Jan 24th, 2000, 12:06 PM
Nicky, can you explain what is not working? What do you get on paper when you print?
The code, that I gave you prints "Hello this is a test" inside the gray box. Isn't it what you wanted? Did I misunderstand you?

Larisa

nicky
Jan 25th, 2000, 01:37 AM
Thanks, Larisa, for responding.. The code you post prints the gray box, no text in the box. I want to print the black "Hello this is a test" in the gray box. Anyone helps me with this one. Thanks very much.

LG
Jan 25th, 2000, 02:55 AM
Nicky, I have no idea why it's not working on your computer. I tested it many time, it works perfect on my computer. Did you put these two lines:

Printer.Print ""
Printer.Print "Hello this is a test"

Larisa

nicky
Jan 25th, 2000, 06:54 AM
I copied the code and pasted it in the form. I got the gray box on the paper -- no words inside the box. I don't know why??

LG
Jan 25th, 2000, 10:01 AM
OK. Try another one:

Printer.FillColor = RGB(255, 255, 255)
Printer.ScaleMode = 5 'Scalemode in inch

Printer.FontName = "Arial"
Printer.FontSize = 9

Printer.Line (0, 0)-(Printer.TextWidth("Hello this is a test") + 0.15, 0.25), RGB(200, 200, 200), BF

Printer.CurrentX = 0.07
Printer.CurrentY = 0.125 - Printer.TextHeight("H") / 2

Printer.Print "Hello this is a test"
Printer.EndDoc

Larisa