Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PrintDialog

Posted on 2001-08-23
3
Medium Priority
?
1,309 Views
Last Modified: 2010-04-06
How can I get Printername selected in TPrintDialog after Print button pressed?
0
Comment
Question by:pmarkov
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

688 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