Override default save form...
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.
Override default save form...
Is there a way that I can override the default save forms with my own?
Thanks in advance
Simon
Thanks in advance
Simon
- Tracker Supp-Stefan
- Site Admin
- Posts: 17906
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Override default save form...
Hello Simon,
Yes there is a way but please do use the search before asking questions - as this one has already been asked and answered:
https://forum.pdf-xchange.com/ ... 66&t=25808
Cheers,
Stefan
Yes there is a way but please do use the search before asking questions - as this one has already been asked and answered:
https://forum.pdf-xchange.com/ ... 66&t=25808
Cheers,
Stefan
Re: Override default save form...
Stefan,
I did see this post, but this does not work for me as this is overriding the save event, where what I want to do is change your standard save form when a document is close.
I am using the following code to close the document:
Which displays the save form, I have used the following events to try and override this, but this is not working:
Thanks in advance
Simon
I did see this post, but this does not work for me as this is overriding the save event, where what I want to do is change your standard save form when a document is close.
I am using the following code to close the document:
Code: Select all
Dim cmd As PDFXEdit.IUIX_Cmd = uiInst.CmdManager.Cmds.Find("cmd.closeAll")
Me.docPreview.Inst.ExecUICmd2(cmd.ID)
Code: Select all
If e.nEventID = nIDS(CInt(IDS.e_document_performSave)) Then
'Do your stuff
MsgBox("Save document")
'If the document should not be saved then we break
If True Then
'...
e.pEvent.Result = 0
'Also we can send the E_FAIL (0 means S_OK) or some other error message so that it would be displayed in the error message box
End If
ElseIf e.nEventID = nIDS(CInt(IDS.e_document_closed)) Then
'Do your stuff
MsgBox("Save document")
'If the document should not be saved then we break
If True Then
'...
e.pEvent.Result = 0
'Also we can send the E_FAIL (0 means S_OK) or some other error message so that it would be displayed in the error message box
End If
ElseIf e.nEventID = nIDS(CInt(IDS.e_annots_inserted)) Then
'disableProperties()
End If
Simon
- Tracker Supp-Stefan
- Site Admin
- Posts: 17906
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Override default save form...
Hi Simon,
In that case you will need to capture the beforeClose event:
https://sdkhelp.pdf-xchange.com/vie ... eforeClose
And mark it as handled - and then display your own dialogue as needed.
Regards,
Stefan
In that case you will need to capture the beforeClose event:
https://sdkhelp.pdf-xchange.com/vie ... eforeClose
And mark it as handled - and then display your own dialogue as needed.
Regards,
Stefan
Re: Override default save form...
Hi Stefan,
I have tried the following, but this is not working. It is still showing the default save form and not displaying my messageBox. Any ideas?
Thanks in advance
I have tried the following, but this is not working. It is still showing the default save form and not displaying my messageBox. Any ideas?
Code: Select all
If e.nEventID = nIDS(CInt(IDS.e_document_beforeClose)) Then
'Do your stuff
MsgBox("Save document")
'If the document should not be saved then we break
If True Then
'...
e.pEvent.Result = 0
'Also we can send the E_FAIL (0 means S_OK) or some other error message so that it would be displayed in the error message box
End If
End if
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Override default save form...
Hello Simon,
Please read a Handled/Result description more carefully.
Cheers,
Alex
Please read a Handled/Result description more carefully.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Override default save form...
Hi Alex,
Sorry my mistake, this is working now.
However because I am now handling the beforeClose event myself by displaying my own save form, the issue I now have is that the PDF Xchange control is not releasing the document. And therefore I get a "file in use error". What code would I need to call to properly release the document?
Thanks in advance
Simon
Sorry my mistake, this is working now.
However because I am now handling the beforeClose event myself by displaying my own save form, the issue I now have is that the PDF Xchange control is not releasing the document. And therefore I get a "file in use error". What code would I need to call to properly release the document?
Thanks in advance
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Override default save form...
Hello Simon,
IPXV_Document::Close should work.
Cheers,
Alex
IPXV_Document::Close should work.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ