moodman Posted May 27, 2005 Posted May 27, 2005 (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 May 27, 2005 by moodman Quote
stustarz Posted May 27, 2005 Posted May 27, 2005 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 Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
moodman Posted May 27, 2005 Author Posted May 27, 2005 I used GetSystemMenu and DestroyMenu API calls to fix the problem. Thanks for your help :--) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.