Results 1 to 10 of 10

Thread: Printer Backcolor and Forecolor?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Posts
    15

    Post

    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

  2. #2

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Posts
    15

    Post

    Please help me with the above problem. Thank you very much.

  3. #3
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    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

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Posts
    15

    Post

    It's not working!

    Please help me asap!

    Thanks very much!

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Posts
    15

    Post

    Please help me!!!!

  6. #6
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    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

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Posts
    15

    Post

    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.


  8. #8
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    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

  9. #9

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Posts
    15

    Post

    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??

  10. #10
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width