Listen to e.beforeShowContextMenu event

PDF-XChange Editor SDK for Developers

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Listen to e.beforeShowContextMenu event

Post by docu-track99 »

Hi Support,
I'm trying to list to the e.beforeShowContextMenu event but there's no event being fired when I did a right click on the previewer. Please let me know what am I doing wrong.

[img]https://drive.google.com/file/d/1GEX16E ... sp=sharing[/img]
[attachment=0]beforeshow.JPG[/attachment]



[code]

Private Sub PdfCtrl_OnEvent(ByVal sender As Object, ByVal e As AxPDFXEdit._IPXV_ControlEvents_OnEventEvent) Handles pdfCtrl.OnEvent
Try

Select Case e.nEventID

Case pdfCtrl.Inst.Str2ID("e.beforeShowContextMenu")
Dim evt As PDFXEdit.IPXV_BeforeShowContextMenuEvent = DirectCast(e.pEvent, PDFXEdit.IPXV_BeforeShowContextMenuEvent)
Dim id = pdfCtrl.Inst.Str2ID("menu.pagesView", False)
If evt.MenuID = id Then

End If
Case pdfCtrl.Inst.Str2ID("e.activeDocChanged")

mWriteLog(15, "PdfCtrl_OnEvent(): Catching event e.activeDocChanged")


[/code]
You do not have the required permissions to view the files attached to this post.
Sasha - PDF-XChange
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Listen to e.beforeShowContextMenu event

Post by Sasha - PDF-XChange »

Hello docu-track99,

Are you able to catch it at all or it's not being fired in any of cases?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Listen to e.beforeShowContextMenu event

Post by docu-track99 »

It not being fired. I'm not sure if it's a bug or I'm not catching it on the right method.
Sasha - PDF-XChange
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Listen to e.beforeShowContextMenu event

Post by Sasha - PDF-XChange »

Hello docu-track99,

Have you registered it for listening how it's being done in the FullDemo application with the IDS enum?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Listen to e.beforeShowContextMenu event

Post by docu-track99 »

There is no sample code for beforeShowContext event on the FullDemo application. Please see the attachment.
You do not have the required permissions to view the files attached to this post.
Sasha - PDF-XChange
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Listen to e.beforeShowContextMenu event

Post by Sasha - PDF-XChange »

Hello docu-track99,

The event needs to be registered for listening. Look how the IDS enum is being registered and do the same.
image.png
Cheers,
Alex
You do not have the required permissions to view the files attached to this post.
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Listen to e.beforeShowContextMenu event

Post by docu-track99 »

Thank you.
Sasha - PDF-XChange
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Listen to e.beforeShowContextMenu event

Post by Sasha - PDF-XChange »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ