- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I use PRINTDLG to select a printer, how can I capture the printer name so I can use it in an OPEN statement?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can capture printer name:...
TYPE(T_DEVMODE):: DM; POINTER(pDM, DM) CHARACTER(32):: szPrinter TYPE(T_PRINTDLG):: PD !Initialize PD here... IF (PrintDlg(PD)) THEN pDM = GlobalLock(PD%hDevMode) szPrinter = DM%dmDeviceName szPrinter = szPrinter(1 : INDEX(szPrinter, CHAR(0))-1) ...... but you can't use it in an OPEN statement. The best you can get with Fortran RTL is to OPEN(...FILE="PRN"), but that will always print to the default printer. What kind of output do you want to print?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page