关于记事本程序打印的问题
On Error GoTo ErrHandler:CommonDialog1.Flags = cdlPDReturnDC + cdlPDNoPageNums
If RichTextBox1.SelLength = 0 Then
CommonDialog1.Flags = CommonDialog1.Flags + cdlPDAllPages
Else
CommonDialog1.Flags = CommonDialog1.Flags + cdlPDSelection
End If
CommonDialog1.ShowPrinter
RichTextBox1.SelPrint CommonDialog1.hDC
Exit Sub
ErrHandler:
Exit Sub
我打印二张后,按取消按钮,仍然再打印一张,
请教,是否ErrHandler:不起作用
怎样修改,谢谢!!!