Results 1 to 3 of 3

Thread: [RESOLVED] Printing filled boxes with Line Method

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    23

    Resolved [RESOLVED] Printing filled boxes with Line Method

    Hello all. I'm trying to print gray boxes using the Line Method:
    VB Code:
    1. 'This is supposed to be a gray rectangle with a black border.
    2. Printer.DrawWidth = 10
    3. Printer.FillColor = RGB(50, 50, 50)
    4. Printer.Line (1440*2.0, 1440 * 6.125)-(1440 * 3.0, 1440 * 6.95), , BF
    5. Printer.Line (1440*2.0, 1440 * 6.125)-(1440 * 3.0, 1440 * 6.95), vbBlack, B
    I'm getting solid black squares. Any ideas? Is there some sort of printer settings I need to verify/change, or should this print in the correct B&W grayscale on any printer?

    Thanks everybody!

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Printing filled boxes with Line Method

    BF in the Line method will fill the square with the same color you've used to draw the line with. Using just B will fill the square using the FillColor if the FillStyle property is set to vbFSSolid.
    VB Code:
    1. 'This is supposed to be a gray rectangle with a black border.
    2. Printer.DrawWidth = 10
    3. Printer.FillColor = RGB(50, 50, 50)
    4. Pribter.FillStyle = vbFSSolid
    5. Printer.Line (1440*2.0, 1440 * 6.125)-(1440 * 3.0, 1440 * 6.95), vbBlack, B

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    23

    Re: Printing filled boxes with Line Method

    Perfect! Thanks!

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