Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing Next menu item from Form's control box
Message
De
16/06/2001 16:14:30
 
 
À
16/06/2001 15:45:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00520294
Message ID:
00520297
Vues:
16
>HEllo All,
>
>Is there a way to remove/disable Next (CTRL+F6) menu item on form's control >box in ULH corner? I've tried to remove it with RemoveMenu API finction but >it requires a handle to window. I tries to get it with GetActiveWindow() API >function but it seems that this handle belongs to _screen rather than form.

Well, it seems like the following code does the trick:


SET LIBRARY TO (HOME()+'foxtools.fll') ADDITIVE
lnWHandle = _WFindTitl(THISFORM.CAPTION)
HWND = _WhToHWnd(lnWHandle)

#DEFINE MF_BYPOSITION 0x400
DECLARE INTEGER GetSystemMenu IN WIN32API integer,integer
DECLARE INTEGER RemoveMenu IN WIN32API integer,integer,integer
hSysMenu = GetSystemMenu(hWnd, 0)
For j = 8 To 7 Step -1
r = RemoveMenu(hSysMenu, j, MF_BYPOSITION)
endfor



Now, the question is "Is there any way to replace foxtools functions with their API analogs?"

TIA
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform