Results 1 to 2 of 2

Thread: deletePrinter.....

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    chicago (hope)
    Posts
    146

    Angry

    Public Declare Function DeletePrinter Lib "winspool.drv" Alias "DeletePrinter" (ByVal hPrinter As Long) As Long


    Command1_Click()
    DeletePrinter Printer.hDC
    End Sub


    is this api call correct????
    b'coz the printer isn't deleted........

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217
    The call is correct, however, the usage isn't. The hPrinter parameter expects a handle to a printer object, not the device context. You can retrieve the printer handle by using the OpenPrinter API function. Also, remember that the printer will not be deleted until all pending jobs are finished.

    Later.

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