Removing system menu item without changing form


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Removing system menu item without changing form

  1. #1
    John Knoop Guest

    Removing system menu item without changing form


    This code:

    hMenu = GetSystemMenu(Form1.hwnd, 0)

    Call RemoveMenu(hMenu, SC_CLOSE, MF_BYCOMMAND)
    Call RemoveMenu(hMenu, SC_MOVE, MF_BYCOMMAND)

    ...should only remove those two menu items.
    But it actually makes the form "unclosable" (is disables the little button
    in the right corner with the "x" on it). It also makes the form "unmovable"
    (nothing happens when I try to drag the menubar).

    How can I remove these menu items without causing this?

    Thanks!

    /john

  2. #2
    Phil Weber Guest

    Re: Removing system menu item without changing form

    > How can I remove these menu items without causing this?

    John: You can't. The only alternative that comes to mind is to owner-draw
    the title bar; then you can include any control buttons you wish, respond to
    mouse down/move events, etc.
    ---
    Phil Weber



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center