Associate
Hi, Hopefully this is an easy one!
I've narrowed down a printing issue I have and have created a very small project to try to explain it.
I'm using the common dialog control to choose a printer.
I have a Command Button that shows the printers.
I have an Option Button that selects either Portrait of Landscape.
I have a label which displays the printer the user has chosen from the common dialog.
I have the following code:
My problem:
When I run the program, as long as I don't change the orientation from portrait to landscape, I can choose another printer. However, as soon as I click on Landscape, I can no longer choose another printer.
I can't see what I'm doing wrong?
I've narrowed down a printing issue I have and have created a very small project to try to explain it.
I'm using the common dialog control to choose a printer.
I have a Command Button that shows the printers.
I have an Option Button that selects either Portrait of Landscape.
I have a label which displays the printer the user has chosen from the common dialog.
I have the following code:
Code:
Private Sub CmdPrint_Click()
CDPrinter.ShowPrinter
LblPrinter.Caption = Printer.DeviceName
End Sub
Private Sub Form_Load()
LblPrinter.Caption = Printer.DeviceName
End Sub
Private Sub OptOrientation_Click(Index As Integer)
If OptOrientation(0) = True Then Printer.Orientation = 1 Else Printer.Orientation = 2
End Sub
My problem:
When I run the program, as long as I don't change the orientation from portrait to landscape, I can choose another printer. However, as soon as I click on Landscape, I can no longer choose another printer.
I can't see what I'm doing wrong?
Last edited: