How to disable the Close('X') button at the top right corner of the screen RRS feed

  • Question

  • Dear All,

        I am working on a Mobile Project (Dynamics Ax Mobile) which uses .Net Comapct Framework 2.0. Here i am developing the Application using the Windows Mobile 5.0 SDK. I use Tasklets to develop the application.

        Can any body help me in finding out "How to disable the Close('X') button at the top right corner of the form".


    With Regards,


    Friday, June 4, 2010 7:08 AM


All replies

  • To turn the 'X' button into 'ok', goto the form properties (right click on the form and select Properties), and set the "MinimizeBox " property to False. Selecting 'ok' on the form when your application is running, will exit the app instead of smart-minimizing it.

    To remove the 'X' or 'ok' altogether from the top-right corner, set the "ControlBox " property to False.

    Both the 'MinimizeBox ' and 'ControlBox ' property are available under the 'Windows Style ' section of the form properties.



    Friday, June 4, 2010 10:03 AM
  • Dear Prabhu,

       I did not find the option "Windows Style" or "ControlBox" or "MinimizeBox" in the properties window of my form(That is to say Tasklet1View designer).

    Can you please help me in solving out this issue.

    With Regards,


    Friday, June 4, 2010 10:25 AM
  • Are you creating a form based application?

    And you mean you don't see the properties, like in this image below...




    Friday, June 4, 2010 10:33 AM
  • As im developing  a Dynamics Mobile application, i am using Tsklet based projects in my application.

    Microsoft.Dynamics.Mobile.Framework.Controls.TaskletView is the class from where the form is inhereted

    Friday, June 4, 2010 11:27 AM
  • Hi Ravi,

    I was one of the developer for the dynamics mobile framework and I can tell you that there is no easy way to remove the "X".

    You might be able to do it by accessing the main form using the ServiceDependency attribute to "inject" the form into the tasklet (otherwise the RolePadForm might even have a static accessor...) and then change the settings. I am not sure if this would work but you can try it out.

    Otherwise the only place where you can control that would be on the first tasklet where you can decide to show an "X" or an "Ok" button. That is done by changing a setting in the userRole.xml (or app.config). I do remember the setting but if you need that I could take a look at it ;)

    Best regards,

    Laurent Lopez

    Tuesday, June 8, 2010 7:35 AM
  • Microsoft Dynamics Mobile has been discontinued: http://blogs.msdn.com/b/dynamicsmobile/archive/2009/09/24/microsoft-dynamics-mobile-has-been-discontinued.aspx 

    Anyway this is not the forum you can get help about Dynamics. Maybe you can get some help from the Microsoft Dynamics forums. However, you most likely need to call Microsoft Technical Support for a discontinued project still within its support lifetime.

    Please mark the post that helps you, and unmark that does not. This benefits our community.
    Tuesday, June 8, 2010 8:58 AM
  • Set the Control Box property as false in property window of that Form
    Tuesday, June 8, 2010 12:40 PM
  • Hi Laurent,

         Thank you for your reply. The requirement for me is to disable the close functionality of the form when the user clicks the (X) button. Please execuse me for my ignorance, i am not aware of the functionality of the "OK" button. What will happen if the OK button is clicked(My Requirement is that the form should not be closed when i click this button as i have given the navigation buttons in the form of soft keys in the bottom end of the screen through the UserRole.xml file).  Can you please let me know of the setting for this.

    With Regards,


    Wednesday, June 9, 2010 3:54 AM