Solved

PrintDialog

Posted on 2001-08-23
3
1,236 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
Comment Utility
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
Comment Utility
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
Comment Utility
PrintDialog1.Execute;
  ShowMessage(Printer.Printers[Printer.PrinterIndex]);
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now