Databases - Right Click

Right clicking the mouse generally gives context sensitive help.

Paradox | MS Access | Delphi | Visual Basic | Java


Paradox


MS Access 97

There is no "Right Click" event - instead you can use one of 2 ways to handle Right Mouse clicks


Pop-up Menus

Define a pop-up menu and attach it to the control's ShortcutMenuBar property.

In order to define a pop-up menu

In order to edit a pop-up menu contents (the line items)

In order to attach your custom pop-up menu to a control's ShortcutMenuBar property, simply click the property's down arrow and select the appropriate definition.


MouseUp Event

Notes: Well, the help says that to disable the default pop-up menu - simply set the ShortcutMenuBar property to a value that isn't the name of an existing shortcut menu or menu bar macro. As usual, that doesn't work - it mearly generates an error and then opens the default menu.

I tried setting the property to a null subroutine - but that popped up a small empty box.

I even tried creating a macro to cancel the event, but the default pop-up still displayed.


Delphi 5.0

There is no "Right Click" event - instead you can use one of 3 ways to handle Right Mouse clicks


Pop-up Menus

Simply define a pop-up menu and attach it to the control's PopupMenu property.

Normally, you should also set the menu's AutoPopup property to true.


ContextPopup Event

This is basically a "Right Click" event except that other actions that open a context menu will also call it (such as Ctrl-Shift-F10 or pressing the keyboard's pop-up key).

Set the Handled parameter to True to suppress the default context menu.


MouseUp Event


Visual Basic 6.0


Java


Author: Robert Clemenzi - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / Databases / RightClick.html