Solved

PrintDialog

Posted on 2001-08-23
3
1,252 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 50 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 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