|
-
Aug 14th, 2000, 05:56 PM
#1
Thread Starter
Hyperactive Member
I'm using the SetBkMode APi to turn transparent the printer font. It functions very well in almost all printers when the application is working on Win9x. But when the same app is working on WinNT this API doesn't work.
This is the code I use:
iBKMode = SetBkMode(Printer.hdc, TRANSPARENT)
Where TRANSPARENT constant is equal to 1.
The Printer.FontTransparent that comes in VB doesn't function.
Any idea about this?
Ulises Vázquez
[size=1.7]Oracle DBA Certified Professioanl
Visual Basic 6 Developer
Crystal Reports Designer
[/size]
-
Aug 24th, 2000, 05:51 PM
#2
Member
What is the return value from the API call?
I'll try my best
Grant French
-----------------------------------------------
E-Mail: [email protected]
ICQ: 33122184
-
Aug 25th, 2000, 08:27 AM
#3
Thread Starter
Hyperactive Member
I don't know. This problem just has presented in a pair of computers where I installed only the executable. I have found that is not only in WinNT, because there are some NT OS where it works fine.
Any idea about the diferent values it can return?
Ulises Vázquez
[size=1.7]Oracle DBA Certified Professioanl
Visual Basic 6 Developer
Crystal Reports Designer
[/size]
-
Aug 25th, 2000, 04:22 PM
#4
Member
If the return value is none-zero it means that the function has failed. If it has failed that would explaain why it is not working, if it has succeeded then the problem lies else where.
Grant French
e-mail: [email protected]
ICQ: 33122184
-
Aug 25th, 2000, 04:25 PM
#5
Monday Morning Lunatic
The SDK says this:
Parameters
hdc
[in] Handle to the device context.
iBkMode
[in] Specifies the background mode. This parameter can be one of the following values. Value Description
OPAQUE Background is filled with the current background color before the text, hatched brush, or pen is drawn.
TRANSPARENT Background remains untouched.
Return Values
If the function succeeds, the return value specifies the previous background mode.
If the function fails, the return value is zero.
Windows NT/ 2000: To get extended error information, call GetLastError.
Remarks
The SetBkMode function affects the line styles for lines drawn using a pen created by the CreatePen function. SetBkMode does not affect lines drawn using a pen created by the ExtCreatePen function.
The iBkMode parameter can also be set to driver-specific values. GDI passes such values to the device driver and otherwise ignores them.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 25th, 2000, 04:30 PM
#6
Member
Sorry i got it the wrong way round. Thankyou Parksie for correcting me.
Grant French
-----------------------------------------------
E-Mail: [email protected]
ICQ: 33122184
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
|