PrintPreviewDialog printing bug

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can display multiple pages in a PrintPreviewDialog with no problem but clicking the Print button on the dialog only prints the first page. Anyone else come across this problem

This is on Win2K, not Win98. I've seen that there's a bug with printing in Win98. Anyone has some info on that?
 
* =?Utf-8?B?SmltIFBlcnJ5?= said:
I can display multiple pages in a PrintPreviewDialog with no problem
but clicking the Print button on the dialog only prints the first
page. Anyone else come across this problem?

I assume that this is caused by a bug in your application. Remember
that clicking the button will have to execute the same code as used for
creating the print preview. So, make sure to reset everything after
creating the print preview.
 
Hello,
Private Sub mnuFileOpen_Click()
Dim sFile As String


If ActiveForm Is Nothing Then LoadNewDoc


With dlgCommonDialog
.DialogTitle = "Open"
.CancelError = False
'ToDo: set the flags and attributes of the common dialog control
.Filter = "Document Files (*.doc)|*.doc"
.ShowOpen
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
frmDocument.rtfText.LoadFile sFile
frmDocument.Caption = sFile


End Sub

Warm Regards,

Ayaz Ahmed
Software Engineer & Web Developer
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Karachi, Pakistan
Mobile +92 300 2280950
Office +92 21 455 2414
 
Hello,

Private Sub mnuFilePrint_Click()
On Error Resume Next
If ActiveForm Is Nothing Then Exit Sub


With dlgCommonDialog
.DialogTitle = "Print"
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If ActiveForm.rtfText.SelLength = 0 Then
.Flags = .Flags + cdlPDAllPages
Else
.Flags = .Flags + cdlPDSelection
End If
.ShowPrinter
If Err <> MSComDlg.cdlCancel Then
ActiveForm.rtfText.SelPrint .hDC
End If
End With

End Sub

Private Sub mnuFilePrintPreview_Click()
'ToDo: Add 'mnuFilePrintPreview_Click' code.
MsgBox "Add 'mnuFilePrintPreview_Click' code."
End Sub

Warm Regards,

Ayaz Ahmed
Software Engineer & Web Developer
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Karachi, Pakistan
Mobile +92 300 2280950
Office +92 21 455 2414
 
Hello,

i know this is dot net group , but i dont have much time to convert into
vb.net thats why post my vb code to help print preview. if u mind then i
am sorry , i am trying to help you. sorry i dont post any comments now
in this group.

Thanks,


Warm Regards,

Ayaz Ahmed
Software Engineer & Web Developer
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Karachi, Pakistan
Mobile +92 300 2280950
Office +92 21 455 2414
 
* Ayaz Ahmed said:
i know this is dot net group , but i dont have much time to convert into
vb.net thats why post my vb code to help print preview. if u mind then i
am sorry , i am trying to help you. sorry i dont post any comments now
in this group.

Sorry, was just a comment, because some of the samples cannot be easily
converted to VB.NET.

You are welcome!
 
Back
Top