-
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
-
Please help me with the above problem. Thank you very much.
-
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
-
It's not working!
Please help me asap!
Thanks very much!
-
-
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
-
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.
-
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
-
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??
-
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