DialogBoxShowingEventArgs not working for Printing DialogBox

DialogBoxShowingEventArgs not working for Printing DialogBox

thannaingoo.api
Advocate Advocate
401 Views
1 Reply
Message 1 of 2

DialogBoxShowingEventArgs not working for Printing DialogBox

thannaingoo.api
Advocate
Advocate

Dear All, 

 

I am trying to get the printing dialog box event using DialogBoxShowingEventArgs.

It is proper working for another dialog box but not working for the print dialog box.

How should I do to get the printing dialog box event?

 

Thanks

 

0 Likes
402 Views
1 Reply
Reply (1)
Message 2 of 2

aricke59
Enthusiast
Enthusiast

I have just tried it in my software and the print dialog is trapped. Note that there are taskdialogshowingeventargs and messageboxshowingeventargs. Are you casting to the correct type?

 

Public Shared Sub docshowing(ByVal sender As Object, ByVal e As DialogBoxShowingEventArgs)

Dim tds As TaskDialogShowingEventArgs = TryCast(e, TaskDialogShowingEventArgs)

Dim mbs As MessageBoxShowingEventArgs = TryCast(e, MessageBoxShowingEventArgs)

Dim dbs As DialogBoxShowingEventArgs = TryCast(e, DialogBoxShowingEventArgs)

0 Likes