Results 1 to 5 of 5

Thread: [RESOLVED] Making text transparent printer object

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2013
    Posts
    236

    Resolved [RESOLVED] Making text transparent printer object

    Hi
    Probably a noob question here and I likely won't explain it very well.
    I am trying to overprint a document, just putting Xs in various boxes mainly
    The way I've done it is to use the paintpicture method of the printer object first
    to print an image of the document and then use the print method to put the Xs at the correct locations
    before finnally using enddoc.
    It works fine except that on parts of the document background that aren't white
    you can see that every letter is contained in a white box.
    Is there any easy way of just printing the letter and have it's background transparent
    so it doesn't obscure the picture behind?
    Thanks for any help

  2. #2
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: Making text transparent printer object

    Did you give the SetBkMode API a try? As in,

    Declaration
    Code:
    Public Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
    Public Const TRANSPARENT = 1
    Public Const OPAQUE = 2
    Code
    Code:
    SetBkMode Printer.hdc, TRANSPARENT
    Ref.
    https://docs.microsoft.com/en-us/win...ngdi-setbkmode

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2013
    Posts
    236

    Re: [RESOLVED] Making text transparent printer object

    That worked perfectly!
    Thank you!!

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: [RESOLVED] Making text transparent printer object

    See Printer.FontTransparent instead.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2013
    Posts
    236

    Re: [RESOLVED] Making text transparent printer object

    Quote Originally Posted by dilettante View Post
    See Printer.FontTransparent instead.
    Wow, I can't believe I missed that. 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