Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PrintDialog

Posted on 2001-08-23
3
Medium Priority
?
1,325 Views
Last Modified: 2010-04-06
How can I get Printername selected in TPrintDialog after Print button pressed?
0
Comment
Question by:pmarkov
3 Comments
 
LVL 3

Accepted Solution

by:
MarcG earned 100 total points
ID: 6417152
You have to use a TPrinter

var SelectedPrinter : String;

if PrintDialog1.execute then
  SelectedPrinter := printer.printers[Printer.PrinterIndex];

TPrintDialog alone will not print
0
 

Author Comment

by:pmarkov
ID: 6417199
And I thing so, but:

Name: Star NX-1500 (in Print Dialog's drop-down box)
Type: Star NX-1500
Where: LPT1

and

if "SelectedPrinter := printer.printers[Printer.PrinterIndex]" then ===>>> SelectedPrinter = "Star NX-1500 on LPT1"  :((((

I want the NAME. Most often Name is the same as the Type (I am not sure!!!) so in this case I want NAME OR TYPE.
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 6419558
PrintDialog1.Execute;
  ShowMessage(Printer.Printers[Printer.PrinterIndex]);
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question