Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sysmenu of a form
Message
From
19/10/2009 07:28:45
 
 
To
19/10/2009 07:23:15
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01429815
Message ID:
01429833
Views:
51
>>>>>Hi All,
>>>>>
>>>>>I need to open the sysmenu of a form via code. How to do this?
>>>>>
>>>>>Agnes
>>>>
>>>>Agnes,
>>>>
>>>>I have this code in the Click of a form's commandbutton
>>>>
>>>>
>>>>#define WM_COMMAND 0x0111
>>>>#define WM_SYSCOMMAND	0x0112
>>>>
>>>>#define SC_KEYMENU	0xF100
>>>>#define	WM_CHAR 0x0102
>>>>
>>>>declare integer PostMessage in user32.dll long, long, long, long
>>>>
>>>>&& select the menu
>>>>=PostMessage (m.thisform.hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0)
>>>>
>>>>&& make it drop down
>>>>=PostMessage (m.thisform.hwnd, WM_CHAR , asc(space(1)), 0)
>>>>
>>>
>>>
>>>Hi Gregory,
>>>
>>>this one opens the applications menu (Like "ALT"+ space"). I need the one of the form ("ALT" + "-").
>>>
>>>Agnes
>>
>>hi Agnes,
>>
>>I guess we do not share the meaning of 'sysmenu'
>
>No, we do.
>
>Beg your paedon, I've used a form without caption for testing and those does redirceted to the app. It works fine for normal forms.
>
>Thank you
>
>Agnes


I was kind of confused reading your answer. I had tested it with _vfp.hwnd and thisform.hwnd prior to posting

Anyway, glad it helps - when your form has a caption, this is
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform