Hide File menu from a form

Hello,

I would like to hide/disable file menu in a form through x++ code for certain condition in ax 2012 R3. Any suggestions?

Thank for your help!!

Try by setting the HideToolBar property of the design to Yes.