Resume from onLoad error - InfoPath Dev
in

InfoPath Dev

Resume from onLoad error

Last post 12-07-2005 11:11 PM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-04-2005 06:34 PM

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

    Resume from onLoad error

    Hi all,

    Does any body know if I can catch an error onLoad and resume with some error handling code? I am assigning full trust to my forms but for people who have not got the forms registered, I want to suppress the infopath message that says "the form is using your computer resources" and just quit the application with a more user-friendly message.
  • 12-05-2005 08:41 PM In reply to

    Re: Resume from onLoad error

    Sure, you can put a try/catch around the section that is accessing the computer resources, parse the exception message and display an alert with the message you want. Of course, this requires C# but it's easy to do.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 12-07-2005 02:27 PM In reply to

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

    Re: Resume from onLoad error

    Sorry Patick could you perhaps direct me on where to implement this try/catch clause? I have placed it in the form's onLoad event but no matter how I wrote it the InfoPath standard error message "form is using your computer resource" still pops up.

    I have a feeling InfoPath checks for the requireFullTrust attribute before reading my code. This meant that I cannot suppress the InfoPath message. Is there a workaround?
  • 12-07-2005 11:11 PM In reply to

    Re: Resume from onLoad error

    Go to Form Options and set the security to be automatic. Do you have any data connections defined to your local hard drive? If so, I suggest removing them and adding programmatically. One more method would be to create a form from scratch and test it out ... hope this helps! More soon.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.