Results 1 to 6 of 6

Thread: printing problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 1999
    Location
    Reynosa, Mexico
    Posts
    274
    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]

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    60

    Unhappy

    What is the return value from the API call?

    I'll try my best
    Grant French
    -----------------------------------------------
    E-Mail: [email protected]
    ICQ: 33122184

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 1999
    Location
    Reynosa, Mexico
    Posts
    274
    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]

  4. #4
    Member
    Join Date
    Aug 2000
    Posts
    60
    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

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  6. #6
    Member
    Join Date
    Aug 2000
    Posts
    60
    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
  •  



Click Here to Expand Forum to Full Width