PRB: KEYBOARD "{RIGHTMOUSE}" Fails (260359)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q260359

SYMPTOMS

Without an ON KEY LABEL in effect, no noticeable effect occurs when you issue the following command:
KEYBOARD "{RIGHTMOUSE}"
				

RESOLUTION

To resolve this problem, issue the following command (with the appropriate coordinates) instead:
MOUSE RIGHT CLICK AT MROW(), MCOL()
				

-or-

MOUSE RIGHT CLICK AT 0,0
				

STATUS

This behavior is by design.

MORE INFORMATION

At first glance, it seems as though KEYBOARD "{RIGHTMOUSE}" fails if you issue it from the Command window. However, it is not that simple.
ON KEY LABEL RIGHTMOUSE WAIT WINDOW "He plays the violin..."
KEYBOARD "{RIGHTMOUSE}"
				
This code produces the specified message, and right-clicking the mouse also produces the message. If you use the MOUSE RIGHT CLICK command above, the wait window flashes briefly. When you press the context menu key on keyboards that include it, though, it does not trigger a {RIGHTMOUSE}; instead, you get a context menu.

REFERENCES

Microsoft Visual FoxPro Help file; topic: "KEYBOARD"; topic: "ON KEY LABEL".

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbCodeSnippet kbOLDocs kbprb KB260359