Hello,
I want to disable the toolbars in an infopath form with c# code, and found this msdn article very useful on how to do so.
http://msdn.microsoft.com/en-us/library/bb608311%28office.11%29.aspx#officeinfopathcustomizinginfopathmenusandtoolbars_customizingmenusandtoolbars
This article also talks about re-enabling the toolbars, by writing the logic, in an event like OnSubmitRequest.
But, what if the user does not submit the form and just close the form with the windows (X) on the upper right corner?
or what if the system crashes, then there is no way to re-enable the toolbars.
Is there a workaround for this in infopath? HOw to re-enable the toolbars in such a way, that we know that code will execute when an infopath form closes.