Using ShellExecute PrintTo

Discussion in 'ASP .Net' started by Marcel Sammut, Jan 3, 2004.

  1. Greetings,
    I am converting a VB6 application to .net and am having troubles trying to
    print a document directley to the printer. My VB6 app used the API
    ShellExecute method to accomplish this, however, needed the printer name,
    driver and port. All which were obtainable using the Printer object in VB6.
    Now in .net, I've tried using the System.Drawing.Printing namespace to do
    this, but that is unsatisfactory. So I went back to the API ShellExecute
    method. However, I am only able to obtain the printer name property of the
    selected printer. In order to use ShellExecute, I must also obtain the
    printer port and driver.
    Does anyone know how to obtain the printerport and printerdriver properties
    of a selected printer?

    Thanks,
    Marcel Sammut
    Marcel Sammut, Jan 3, 2004
    #1
    1. Advertising

  2. Marcel,

    I think you'll find the port and driver are legacy information from
    Windows 3.1, you don't need to use them to print.

    Tony Edgecombe
    www.frogmorecs.com/ng
    Software for printing

    "Marcel Sammut" <> wrote in message news:<>...
    > Greetings,
    > I am converting a VB6 application to .net and am having troubles trying to
    > print a document directley to the printer. My VB6 app used the API
    > ShellExecute method to accomplish this, however, needed the printer name,
    > driver and port. All which were obtainable using the Printer object in VB6.
    > Now in .net, I've tried using the System.Drawing.Printing namespace to do
    > this, but that is unsatisfactory. So I went back to the API ShellExecute
    > method. However, I am only able to obtain the printer name property of the
    > selected printer. In order to use ShellExecute, I must also obtain the
    > printer port and driver.
    > Does anyone know how to obtain the printerport and printerdriver properties
    > of a selected printer?
    >
    > Thanks,
    > Marcel Sammut
    >
    Tony Edgecombe, Jan 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    ShellExecute and Process

    Guest, Nov 3, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    566
  2. =?Utf-8?B?RGF2aWRT?=

    ShellExecute command for ASP.NET?

    =?Utf-8?B?RGF2aWRT?=, Sep 30, 2004, in forum: ASP .Net
    Replies:
    12
    Views:
    6,908
    Kevin Spencer
    Oct 1, 2004
  3. John

    ShellExecute Question

    John, Dec 7, 2004, in forum: C++
    Replies:
    3
    Views:
    8,995
    James Rafter
    Dec 7, 2004
  4. Josh

    Win32api shellexecute Bshow

    Josh, Feb 16, 2005, in forum: Python
    Replies:
    2
    Views:
    1,885
  5. Mav
    Replies:
    3
    Views:
    212
    Ben Morrow
    Oct 10, 2007
Loading...

Share This Page