|
-
May 15th, 2002, 08:27 AM
#1
Thread Starter
Registered User
Printing form with commondialog in landscape, NOT portrait
I am trying to print a form, but do it in landscape. i have the following code...
VB Code:
Private Sub PRINTButton_Click()
10 DELETESUBButton.Visible = False
20 ADDSUBButton.Visible = False
30 DONEButton.Visible = False
40 DESIGNPropBlockButton.Visible = False
50 DESIGNSwithButton.Visible = False
60 BACKButton.Visible = False
70 PRINTButton.Visible = False
Dim bCancel As Boolean
Dim nCopy As Integer
80 On Error GoTo ErrorHandler
90 bCancel = False
100 CommonDialog1.FLAGS = cdlPDHidePrintToFile Or _
cdlPDNoSelection Or _
cdlPDNoPageNums Or _
cdlPDCollate
110 CommonDialog1.CancelError = True
120 CommonDialog1.PrinterDefault = True
130 CommonDialog1.Copies = 1
140 CommonDialog1.ShowPrinter
150 If bcancel = False Then
160 For nCopy = 1 To CommonDialog1.Copies
170 frmPowerSystemDesign.PrintForm
180 Next nCopy
190 End If
200 DoEvents
210 DELETESUBButton.Visible = True
220 ADDSUBButton.Visible = True
230 DONEButton.Visible = True
240 DESIGNPropBlockButton.Visible = True
250 DESIGNSwithButton.Visible = True
260 PRINTButton.Visible = True
270 BACKButton.Visible = True
ErrorHandler:
280 If Err.Number = cdlCancel Then
290 bcancel = True
300 Resume Next
310 End If
End Sub
It brings up the printer selection, but when you select landscape, it prints in portrait. does anyone know what is wrong....
thanks,
Jeff
Last edited by jkw119; May 15th, 2002 at 09:07 AM.
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
|