Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make popup-menu more user friendly?
Message
 
 
À
14/11/2000 03:27:54
Wouter Schut
Www.Selectif.Nl/Www.Seweso-Systems.Com
Andelst, Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00440929
Message ID:
00441652
Vues:
9
>I noticed that when I go over some menu's wich have submenu's (in any windows application), the menu's don't open until the mouse is over the menu for a certain amount of time. This is NOT the case with VFP menu's! so tell me how can I get this effect in my VFP menu's? This will make my menu's much faster!
>

As Dragan suggested, there is an API to set the interval. It is determined by the double click interval set in Mouse applet of the Control Panel. Try the following code:

declare integer SetDoubleClickTime in "user32" integer
SetDoubleClickTime(1000) && returns a non-zero if successful

The attempt to use your menu. Note that this changes the setting for all Windows so be careful of using this. Also note that unlike setting the _DBLCLICK variable for incremental searching for comboboxes, setting _DBLCLICK does not affect menu behaviors. You must go through the API.

>By the way, I have never seen an option to put scrollbars in a menu when I was programming in Delphi/C++/etc. so why is this an option in VFP? My only conclusion can be that the menu system wich VFP uses isn't the standard windows menu system, but it is a menu system wich goes back a long way (win 3.1 etc). So please don't tell me it is standard because it isn't.
>

I will disagree with you here. Menus generated by VFP are Windows menus. You can get a handle to them and manipulate them as easily (or not) as any other menu. For example, create a menu with VFP with at least one menu option. Then run the followingf code with that menu active:
#DEFINE MF_BYPOSITION   0x400
#DEFINE MF_HILITE       0x80
#DEFINE MF_UNHILITE     0x0
declare integer GetMenu in "user32" integer
declare integer HiliteMenuItem in "user32" integer hWnd, integer hMenu, integer nMenuItem, integer nActionFLag

set library to foxtools.fll
lnh = MainHWnd()
lnm = GetMenu(lnh)
=HiliteMenuItem(lnh,lnm,0,MF_BYPOSITION+MF_HILITE)
=inkey(1)
=HiliteMenuItem(lnh,lnm,0,MF_BYPOSITION+MF_UNHILITE)
As for the SCROLL keyword for menus, while you may not be able to create menus that scroll in other development environments, that in no way invalidates menus created with VFP. You can not fault the Fox Team for giving you more!!!
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform