Re: Writing a right-button popup menu
From: Jeff Johnson (i.get_at_enough.spam)
Date: 08/15/04
- Next message: Jeff Johnson: "Re: Creating .rtf document in VB"
- Previous message: Jeff Johnson: "Re: Format of Created XML File"
- In reply to: Stan Hilliard: "Writing a right-button popup menu"
- Next in thread: Gale Green: "Re: Writing a right-button popup menu"
- Reply: Gale Green: "Re: Writing a right-button popup menu"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 14 Aug 2004 21:42:16 -0400
"Stan Hilliard" <usenetreplyMS@samplingplansNOTSPAM.com> wrote in message
news:vh7th09a47luaoaimpl7e80o3lvfn386s8@4ax.com...
> 1) My code above refers to the menu "mnuWindowMenu" on the MDI.
> I want to add another item to the popup that is not in the
> "mnuWindowMenu" menu -- like the "select-all" item from the edit
> menu.
> How can I add that other item to the popup without changing the
> "mnuWindowMenu" menu that is shown on the MDI?
Put the item in the menu and set its Visible property to False. In your
right-click handler, make it visible. In the mnuWindowMenu_Click event, make
it invisible.
> 2) Textboxes already apparently have a default right click popup menu
> that comes up prior to my popup. How can I turn that off?
Declare the API function ReleaseCapture() and call it when you detect a
right mouse click. Personally, I think the best way is to subclass the text
box and eat the WM_CONTEXTMENU message, but the above suggestion will work
as well. You'll probably also get the "pure VB" suggestion of disabling and
enabling the text box, but I think that's just cheesy and won't suggest it.
Oh, wait...damn!
- Next message: Jeff Johnson: "Re: Creating .rtf document in VB"
- Previous message: Jeff Johnson: "Re: Format of Created XML File"
- In reply to: Stan Hilliard: "Writing a right-button popup menu"
- Next in thread: Gale Green: "Re: Writing a right-button popup menu"
- Reply: Gale Green: "Re: Writing a right-button popup menu"
- Messages sorted by: [ date ] [ thread ]