I would like to detect if user does Save or Save As.
I have implemented ON Event for pdfCtrl. See below.
Private Sub PdfCtrl_OnEvent(ByVal sender As Object, ByVal e As AxPDFXEdit._IPXV_ControlEvents_OnEventEvent) Handles pdfCtrl.OnEvent
My issue is, regardless what user clicks (Save or Save AS) it generates e.nEventID same (2264 gets genereted bor both Save and Save As). I would like to execute different code when doing Save As. Is there a programmatic way to detect which button has been pressed?
How to detect between Save and Save AS
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
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.
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.
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: How to detect between Save and Save AS
Hello docu-track99,
The best way would be to handle the command execution itself by implementing a custom command handler - there you will now the command ID that was executed:
https://gist.github.com/Polaringu/ad31ad433401c1c004d0
Cheers,
Alex
The best way would be to handle the command execution itself by implementing a custom command handler - there you will now the command ID that was executed:
https://gist.github.com/Polaringu/ad31ad433401c1c004d0
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: How to detect between Save and Save AS
Hello docu-track99,
The best way would be to handle the command execution itself by implementing a custom command handler - there you will now the command ID that was executed:
https://gist.github.com/Polaringu/ad31ad433401c1c004d0
Cheers,
Alex
The best way would be to handle the command execution itself by implementing a custom command handler - there you will now the command ID that was executed:
https://gist.github.com/Polaringu/ad31ad433401c1c004d0
Cheers,
Alex
Last edited by docu-track99 on Wed May 25, 2016 6:22 pm, edited 1 time in total.
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: How to detect between Save and Save AS
Hello Alex,
The link you gave me has code for OpenFileDialog, I still need tracker's code to implement FileSave in my customizeSaveCommandToolStripMenuItem.click.
Thanks,
The link you gave me has code for OpenFileDialog, I still need tracker's code to implement FileSave in my customizeSaveCommandToolStripMenuItem.click.
Thanks,
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: How to detect between Save and Save AS
The link I gave illustrates how to implement an overall custom command handler. The open command was given earlier to someone as an example. You'll need to implement something like that for save command. This will allow you to monitor when the command was executed.
One more thing - you will need a listener handler, meaning that you'll need to redirect all of the methods to previous handler. That all would look like this:
https://gist.github.com/Polaringu/16bb2 ... 7cbe36f4e6
Cheers,
Alex
One more thing - you will need a listener handler, meaning that you'll need to redirect all of the methods to previous handler. That all would look like this:
https://gist.github.com/Polaringu/16bb2 ... 7cbe36f4e6
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ