Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Right mouse click with keyboard?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00095779
Message ID:
00095842
Vues:
25
>Colin,
>
>My cForm baseclass has this KeyPress() method:
>
LPARAMETERS nKeyCode, nShiftAltCtrl
>
>if ( nKeyCode = 93 )
>   * provide Shift+F10 shortcut menu activation
>   this.RightClick()
>   nodefault
>endif

><
>>Does anyone know if there is a Windows standard for keyboard access to right click? Some keyboards, mine included, have a shortcut menu key so I'm assuming there must be some key combination for keyboards without this.


If you want to display a shortcut menu, this menu will pop at the mouse position if the menu is coded like this:
DEFINE POPUP QuickFill SHORTCUT FROM mrow(),mcol()

For example if the mouse is on the left side of the screen and the focus on the rightmost control of your form, the popup menu is display at the mouse position. User will be confuse.

The workaround is to check if the mouse is over the control like this:
*	IF From Shift+F10
	MouseIsOver=SYS(1270)
	IF Type('MouseIsOver')='O' AND MouseIsOver.Name=This.Name
		DEFINE POPUP QuickFill SHORTCUT FROM mrow(),mcol()
	ELSE
		nRow =(wrows()/thisform.height) *(OBJTOCLIENT(this, 1)+this.height)
		nCol = (WCOLS()/thisform.width) *(OBJTOCLIENT(this, 2)+10) 
		DEFINE POPUP QuickFill SHORTCUT FROM nRow,nCol
	ENDIF	
        
       ***you menu definition...
:0)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform