Loading...

Select printer before printing image with TgdViewer

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Select printer before printing image with TgdViewer

Postby wallas » Thu Jun 21, 2007 12:07 pm

Hi,

I'm not sure if this is a waisted a question...

I'm trying to print an image, but before i do that, i want to select a printer different to my default one by using a TPrintDialog. Because the TgdViewer uses my default printer.

Is it possible to do this with TgdViewer and if it isnt, is there a work around?

Thanking you in advance!

Jo
wallas
 
Posts: 10
Joined: Thu Jun 21, 2007 11:55 am

Postby Loïc » Thu Jun 21, 2007 7:05 pm

Hi,

First, you can enumerate all your printers like that:


Code: Select all
For nCpt = 1 to oGdPicture.PrintGetPrintersCount()
    MsgBox oGdPicture.PrintGetPrinterName(nCpt)
Next nCpt



Second, you can select one of the enumerated printer like that :


Code: Select all
oGdPicture.PrintSetActivePrinter(2)


This line set as active printer the second listed printer into the For .. next statement.


Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Thanks for the answer!

Postby wallas » Tue Jun 26, 2007 1:56 pm

Its exactly what i needed!

Also, thanks for a great product!

Regards,

Johann
wallas
 
Posts: 10
Joined: Thu Jun 21, 2007 11:55 am

Postby Loïc » Tue Jun 26, 2007 2:58 pm

Thank you for your feedback Wallas :D


Regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest