Hi Matt,
Yes I am using the exact same code and using statements.
Here is the reason I am trying to do this outside of the FormCode:
I have a C# Application that is used to pretty much control InfoPath (switch views, save, open, etc). I need a way to disable the toolbars, so the users only see a window that contains the form. Because, once those toolbars are disabled in a specific FormCode, they remain disabled application-wide, and do not show up when users use InfoPath separately from my application. I want to have a button in my application that will let the users re-enable the toolbars.
Any suggestions?