Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid control's MouseWheel event problem
Message
 
 
À
23/11/2003 17:54:36
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00852801
Message ID:
00852821
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
Mike,

I guess I wasn't clear. I sugested that you use the middle mouse button instead of Shift key. User'll have to hold it down why scrolling to change font size.

>Sergey,
>
>I cut and pasted your example code into a grid's MouseWheel event and cannot get a wait window to appear. I held down the Left Shift key while clicking and/or spinning the middle mouse button. Any idea what I'm doing wrong? Does it work for you?
>
>Mike
>
>>Mike,
>>
>>I think you can use middle mouse button (scroll wheel) to do that.
* Grid's MouseWhell
>>LPARAMETERS nDirection, nShift, nXCoord, nYCoord
>>DECLARE SHORT  GetKeyState IN WIN32API INTEGER
>>#define VK_LBUTTON        0x01
>>#define VK_RBUTTON        0x02
>>#define VK_MBUTTON        0x04
>>IF GetKeyState( VK_MBUTTON ) < 0 ;
>>		AND GetKeyState( VK_LBUTTON ) >= 0 ;
>>		AND GetKeyState( VK_RBUTTON ) >= 0
>>  * The middle mouse button is down
>>	WAIT WINDOW PROGRAM()
>>ENDIF	
>>
>>>Hi Sergey,
>>>
>>>I was trying to provide the user with a way to change the fontsize in the grid by using the mousewheel to enlarge or reduce the size. I wanted to use Shift + wheel so as to preserve the default behaviour of the mousewheel in a grid (ie to scroll the grid's contents).
>>>
>>>I've tried successfully to do what I need if I don't try to trap the Shift key. The grid's contents grow or shrink when I spin the mousewheel. It just doesn't want to work if I test for nShift :(
>>>
>>>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform