Visual Basic - duda commondialog

Life is soft - evento anual de software empresarial
 
Vista:

duda commondialog

Publicado por Martin (198 intervenciones) el 12/08/2002 21:01:00
HOLA,DISCULPEN LA IGNORANCIA PERO TENGO EL SIGUIENTE PROBLEMA,EN UN FORM DE VB 6.0 HAY UN COMMONDIALOG QUE ME MUESTRA LAS IMPRESORAS ACTIVAS PERO LO QUE NO SE HACER ES COMO CANCELAR UNA IMPRESION,ES DECIR,ELIGO LA IMPRESORA Y SI LE DOY AL BOTON CANCEL QUE APARECE CON EL COMMONDIALOG DE TODAS MANERAS MANDA A IMPRIMIR
DE ANTEMANO MUCHAS GRACIAS...
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:duda commondialog

Publicado por Vic (141 intervenciones) el 13/08/2002 13:56:58
Prueba el siguiente código. Suerte:

CommonDialog.CancelError=True
On Error Goto PrnError
CommonDialog.ShowPrinter 'o tambiem CommonDialog.Action=5
'Codigo a ejecutar si se pulsa Aceptar en el CommonDialog

SalirImprimir:
Exit Sub
PrnError:
Beep
If Err = 32755 Then
MsgBox "Impresión interrumpida por el usuario", vbExclamation + vbOKOnly, "Imprimir Certificado"
Else
MsgBox "Se ha producido el siguiente error al intentar imprimir: " & Error$ & Chr$(13) & "Código de error: " & Err & Chr$(13) & "Impresión interrumpida", vbCritical + vbOKOnly, "Imprimir"
End If
Resume SalirImprimir
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar