Force Exit without Saving - InfoPath Dev
in

InfoPath Dev

Force Exit without Saving

Last post 10-28-2005 06:24 AM by franck. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-27-2005 11:00 PM

    • qwer
    • Top 500 Contributor
    • Joined on 10-04-2005
    • Posts 49

    Force Exit without Saving

    Hi all,

    For my forms I do not want the users to have the ability to save under any circumstances. I am able to achieve this by using Application.ActiveWindow.Close(true) through the event handlers. However, my only glich is when a user presses the X on the window, which will prompt to save. Is there a way to take control of that (I am assuming this will require full trust again)?
  • 10-28-2005 06:24 AM In reply to

    Re: Force Exit without Saving

    Hi,

    If you take over the Save behavior by code, and modify the code to be:
    function XDocument::OnSaveRequest(eventObj)
    {
    //eventObj.IsCancelled = eventObj.PerformSaveOperation();
    eventObj.ReturnStatus = false;
    }

    The prompt to Save is now gone.
    This can be done even if the form is not Full Trust.

    Hope that it helps.

    Regards,

    Franck Dauché
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.