none
How to disable the box in upper left hand corner of a window

    Question

  • I'm not sure of the name of this box but it becomes accessable when you press the ALT button.  It opens up from the Upper most left hand corner of a window and gives the options to "Restore", "Minimize", "Maximize" and "Close"

     

    Is there a way to disable this one particular box. ???

     

     

    Thanks

     

     

    tattoo

    Thursday, June 19, 2008 5:40 AM

Answers

  • Hi Tattoo,

     

    By default, there are two functions that the Alt key can act. If there is no menu strip in the window, it will pop up a windows menu as I have shown in last reply. On the other hand, if there is a menu strip in the window, it will activate menu strip like “File”, “Edit”, “Help” as you have said.

     

    However, whatever the condition is, we call both manage to suppress the Alt key event in code.

     

    Please notice that I’m using Visual Studio 2008 and C# in WinForm application. Which means my method may not take effect under other develop environment.

     

    Here is the overridden ProcessDialogKey in custom Form1 which inherited from Form class.

    Code Snippet

            protected override bool ProcessDialogKey(Keys keyData)

            {

                if (keyData.ToString().Equals("Menu, Alt"))

                    return true;

     

                return base.ProcessDialogKey(keyData);

            }

     

    Hope it helps.

    Thanks.

     

    Best wishes,

    Jun Wang

     

    Tuesday, June 24, 2008 6:51 AM

All replies

  • Hi Tattoo,

     

    Do you mean this pop up menu of the window?

     

    Well, if it's the pop up that you are talking about, I’m afraid that there has been something wrong with your environment, or your application has captured the ALT event displayed this menu. By default, it can only be popped up when mouse clicked, not ALT pressed. I would appreciate that you provide further detail information about this “box” and its running environment.

     

    If it’s not the “box” that you are talking about, it would be appreciated that you provide more detailed information.

     

    Please feel free to let me know how your problem is going on.

    Thanks.

     

    Best wishes,

    Jun Wang

     

    Monday, June 23, 2008 9:29 AM
  • Hi,

      Am not sure. Consider your control name is XXX1. To hide that

    XXX1.visible=False.

    Make the visible property of the conrol to false.

     

    is it now working...?

    Monday, June 23, 2008 2:33 PM
  • Jun Wang,  thanks for your response.

     

    that is the box I am talking about.....

     

    I have done a little testing on some other Windows applications,

    Excell, Word and even the RSS Reader I am using.

     

    In some programs if you press the ALT Key, if there is a menu across the top of the screen, File, Edit, View, etc....

    and you press ALT then use the left arrow, the program will display the box we are talking about,  in other applications it seems to have been disabled.

     

     

    any other thoughts ?

     

     

    thanks

     

     

    tattoo

     

    Tuesday, June 24, 2008 5:46 AM
  • Hi Tattoo,

     

    By default, there are two functions that the Alt key can act. If there is no menu strip in the window, it will pop up a windows menu as I have shown in last reply. On the other hand, if there is a menu strip in the window, it will activate menu strip like “File”, “Edit”, “Help” as you have said.

     

    However, whatever the condition is, we call both manage to suppress the Alt key event in code.

     

    Please notice that I’m using Visual Studio 2008 and C# in WinForm application. Which means my method may not take effect under other develop environment.

     

    Here is the overridden ProcessDialogKey in custom Form1 which inherited from Form class.

    Code Snippet

            protected override bool ProcessDialogKey(Keys keyData)

            {

                if (keyData.ToString().Equals("Menu, Alt"))

                    return true;

     

                return base.ProcessDialogKey(keyData);

            }

     

    Hope it helps.

    Thanks.

     

    Best wishes,

    Jun Wang

     

    Tuesday, June 24, 2008 6:51 AM
  • Dude, I don't know how to disable that box, but I can tell you the shorcut to display it, it's ALT-SPACE, it'll always appears when you press those keys! GOOD LUCK!
    Friday, July 11, 2008 8:01 PM
  • Hi Jun,

    Is there any correspondence in WPF (XAML/C#) for this?

    I want to disable the Alt + Space menu for my window, but I still need to use the Alt + Space key event to create a custom menu to display instead.

    Monday, August 18, 2008 2:10 PM
  •  

    i also have some similiar problem,

    since i wish to disable or hide the title bar icon that appear at the top left hand side with api call,

    any one here know how to disable or hide it???

    Friday, August 29, 2008 6:20 AM