Hello,
i want exit app by cmd button in file menu.
In full demo there is a command "cmd.exit". When Turn ON and Show no button is visible. When Execute command nothing happens.
Then i add my own exit button in file menu and assign "cmd.exit", but does not work too.
In End User PDF Editor there is exit button in file menu. But how do I get this with SDK?
Best Regards,
edvschu
Exit Application File Menu
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: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: Exit Application File Menu
Hello edvschu,
The Exit command works only for the End-User Editor because control is a part of the form and the closing should be handled by the developer.
Cheers,
Alex
The Exit command works only for the End-User Editor because control is a part of the form and the closing should be handled by the developer.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 127
- Joined: Fri Jun 25, 2010 6:54 am
Re: Exit Application File Menu
Hello Alex,
can you give me a hint, how can i handle close the main form from command handler? Calling Close() leads to a AccessViolationException.
Regards,
edvschu
can you give me a hint, how can i handle close the main form from command handler? Calling Close() leads to a AccessViolationException.
Code: Select all
Public Sub OnNotify(nCode As Integer, pCmd As PDFXEdit.IUIX_Cmd, pItem As PDFXEdit.IUIX_CmdItem, pOwner As PDFXEdit.IUIX_Obj, nNotifyData As UInteger) Implements PDFXEdit.IUIX_CmdHandler.OnNotify
If pCmd.ID = m_nMyExitID Then
m_MainForm.Close()
End If
End Sub
edvschu
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: Exit Application File Menu
Hello edvschu,
Well you are attempting to close the form from within the Editor's handler, meaning that you are attempting to destroy the parent of the Editor's Control while the Control itself is still alive that's why the exception occur.
Cheers,
Alex
Well you are attempting to close the form from within the Editor's handler, meaning that you are attempting to destroy the parent of the Editor's Control while the Control itself is still alive that's why the exception occur.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ