|
-
Feb 14th, 2000, 10:00 PM
#1
Thread Starter
Addicted Member
I have a .ini file were I want to place the printer name or port. I know how to do it. I don't know is how am I going to select that priter in my app. I'm tired of making my clients choos a printer (through diallog) evrey time they want to print if they have more than 1 printer in the PC.
------------------
Jorge Ledo
[email protected]
Portugal
-
Feb 15th, 2000, 03:19 PM
#2
Conquistador
you could try this
i think - i have not tested it
Code:
Dim PrinterKey as string
cdlgPrinter.showprinter
PrinterKey = cdlgPrinter.printername
savesetting ("My App", "Printing", "Default Printer", PrinterKey)
AND TO GET IT:
PrinterKey = getsetting ("My App", "Printing", "Default Printer")
cdlgPrinter.PrinterName = PrinterKey
cdlgprinter.show
tell me how this works 
------------------
david
Teenage Programmer
-
Feb 16th, 2000, 02:22 AM
#3
Thread Starter
Addicted Member
No such a method ".printername" in a dialog box.
But thanks for the efford.
------------------
Jorge Ledo
[email protected]
Portugal were the sun allways shine... for programmers.
-
Feb 16th, 2000, 02:36 AM
#4
Dim ptr As Printer
For Each ptr In Printers
If ptr.DeviceName = "PrinterNameHere" Then
Set Printer = ptr
End If
Next
-
Feb 16th, 2000, 03:54 AM
#5
Thread Starter
Addicted Member
Thanks BG,
Sometimes such a easy thing can give so much trouble. 
Thank you,
A feeling so stupid portuguese,
Jorge Ledo
-
Mar 27th, 2000, 09:17 AM
#6
New Member
i've tryied but not succeciful
Dim ptr As Printer
For Each ptr In Printers
If ptr.DeviceName = "PrinterNameHere" Then
Set Printer = ptr
End If
Next
i've tryied it in vb6 and with win fax and a lex mark printer it did not worked ?
Have I done something wrong ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|