Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)
I have an MDI child form. When the user uses the arrow keys to go between main menu items they can get to both the child forms system menu (see attachment) and the parent forms system menu. How do I delete/remove the child forms system menu? Thanks so much for any help. I've looked everywhere but can't seem to find anything. Edited by moodman
Posted

I can give you one pointer as to what you need to be looking into / thinking about : Windows API. You can listen for the menu being clicked by overriding the WndProc sub-procedure, and try to handle the click event to stop the menu being shown.

 

The function below :

 

Private Declare Function GetSystemMenu Lib "user32" _
(ByVal hwnd As Integer, ByVal bRevert As Boolean) As Integer

 

will return you the system menu reference, pass it the handle of the form you are using. From there i dont quite know off hand. Maybe someone else knows?

 

But this should at least put you in the right direction

Visit: VBSourceSeek - The VB.NET sourcecode library

 

 

"A mere friend will agree with you, but a real friend will argue."

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...