|
-
Apr 20th, 2025, 11:54 AM
#32
Thread Starter
Addicted Member
Re: PDF Reader ActiveX Control
 Originally Posted by DTZlevelei
Thank you for your response! In the sketch above, I was brainstorming how the UI could be made more clear and less "noisy". I mentioned the grey also, and only as a detail, because if the lines and the less important labels are lighter than black, it helps draw attention more effectively to the truly important texts. But it is up to you of course.
.
And the other question: Would it be possible to make the print dialog (opened via PrintPDFWithDialog or PrintPDFWithDialogEx) default to a specific printer that's set from my code?
Yes, it's possible.
The print dialog box displays the Windows default printer by default.
Simply set the default printer to the one you want, then call the print function, and then reset the Windows default printer upon returning.
Code:
Dim WindowsPrinter as String
Dim MyChoiceOfPrinter as String
Dim X as Printer
WindowsPrinter = Printer.DeviceName
MyChoiceOfPrinter = "WhatEverYouWant"
If MyChoiceOfPrinter <> WindowsPrinter And MyChoiceOfPrinter > "" Then
'Change the Windows Default Printer
For Each X In Printers
If X.DeviceName = MyChoiceOfPrinter Then
Set Printer = X
Exit For
End If
Next
End If
' Call the print function.
PrintPDFWithDialogEx
If WindowsPrinter <> Printer.DeviceName Then
' Reset the windows default printer
For Each X In Printers
If X.DeviceName = WindowsPrinter Then
Set Printer = X
Exit For
End If
Next
End If
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
|