Results 1 to 2 of 2

Thread: How do I tell Windows to Print

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2001
    Posts
    17

    How do I tell Windows to Print

    In Windows Explorer if you right click on a file (say a pdf or txt) there is an option to Print. Now Windows does this without opening the coresponding program (Acrobat or Notepad).

    Is there a way to simulate that useing VB?

    Thank you in advance.

  2. #2
    Fanatic Member
    Join Date
    Jan 2001
    Location
    Vietnam
    Posts
    613
    You can do the same thing using the followng API:
    Code:
    Private Declare Function StartDoc Lib "gdi32" Alias "StartDocA" (ByVal hdc As Long, lpdi As DOCINFO) As Long
    Private Declare Function StartPage Lib "gdi32" (ByVal hdc As Long) As Long
    Private Declare Function EndPage Lib "gdi32" (ByVal hdc As Long) As Long
    Private Declare Function EndDoc Lib "gdi32" (ByVal hdc As Long) As Long

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