Disabling the Menu Bar - InfoPath Dev
in

InfoPath Dev

Disabling the Menu Bar

Last post 07-24-2006 11:51 AM by Karsten Brocksieper. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-24-2006 04:52 AM

    Disabling the Menu Bar

    Hi Friends,

    I am very happy that I am getting replies for my posts and I am overcoming my problems in InfoPath because of this Forum. Thanks for all your co-operation.
    Now my new problem is disabling the Menu bar, command bars in InfoPath form when the user is filling the form. Please help me in this problem. Thanks in Advance.

  • 07-24-2006 05:42 AM In reply to

    Hello,

    Right Click on the Small arrow at the end of the tool bar and Also you can Check/Uncheck commands.For More options select Customize. In the Commands Tab select Rearrange Commands and then Delete the Controls you dont want to show in the Menu Bar/Command Bar.

    Hope this will help you.
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 07-24-2006 06:06 AM In reply to

    Hello,

    the above mentioned way describe the steps in the UI.

    On the other side you can do the same with scripting. For example you can hide the 'Standard' and 'Formatting' toolbar with the following commands in the OnLoad event of the form.

    var objCommandbars = Application.ActiveWindow.Commandbars;
    objCommandbars("Standard").Enabled = false;
    objCommandbars("Formatting").Enabled = false;

    Hope this helps.
    Karsten
  • 07-24-2006 06:25 AM In reply to

    Hello Krishna

    Also read the Link below, if you would like to have more information on Customizing Menus and Toolbars

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_ta/html/OfficeInfoPathCustomizingInfoPathMenusandToolbars.asp

    Hope this helps you.
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 07-24-2006 06:30 AM In reply to

    Hi drgkreddy,

    Just i have used the code in the link what you mentioned. but it is comming with error like Security error at this line of code.
    ObjectWrapper commandBars = (ObjectWrapper)thisApplication.ActiveWindow.CommandBars;

    please solve my problem
  • 07-24-2006 06:44 AM In reply to

    Hello Krishna,

    What is the Security level set for your Form?
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 07-24-2006 11:51 AM In reply to

    Hello Krishna,

    to use the CommandBars collection, the form template must be fully trusted. You can use any one of the following options to make sure that your form template is fully trusted:

    • Use the Microsoft .NET Framework 1.1 Configuration utility to grant Full Trust permissions only to your Visual C# .NET code.

    • Digitally sign your form template file (.xsn) by using a code-signing certificate. When you use a code-signing certificate to digitally sign your form template file, users are prompted to trust the form when they open the form. This makes your form fully trusted. Therefore, Full Trust permissions are granted to your Visual C# .NET code.
    • Use external Automation in InfoPath 2003 to call the RegisterSolution method.

    Please refer to:
    http://support.microsoft.com/kb/867442/en-us

    Hope this helps
    Karsten
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.