Message
From
16/06/2001 16:14:30
 
 
To
16/06/2001 15:45:57
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00520294
Message ID:
00520297
Views:
18
>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
Previous
Next
Reply
Map
View