-
Jan 24th, 2020, 04:32 AM
#1
Thread Starter
Addicted Member
[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
-
Jan 24th, 2020, 07:57 AM
#2
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
-
Jan 24th, 2020, 08:46 AM
#3
Thread Starter
Addicted Member
Re: [RESOLVED] Making text transparent printer object
That worked perfectly!
Thank you!!
-
Jan 24th, 2020, 11:53 AM
#4
Re: [RESOLVED] Making text transparent printer object
See Printer.FontTransparent instead.
-
Jan 24th, 2020, 02:02 PM
#5
Thread Starter
Addicted Member
Re: [RESOLVED] Making text transparent printer object
Originally Posted by dilettante
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|