Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetMessage API Hook in Form
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00888527
Message ID:
00888723
Views:
26
Brent,

This message is recieved by the VFP ON SHUTDOWN handler
on shutdown clear events && set up the shutdown handler

_screen.BackColor = 255
read events && go into the event loop

* this code won't execute until the window X button is clicked or closed from the taskbar button

_screen.BackColor = rgb( 0, 0, 255 )
Messagebox( "on my way outta here" )

on shutdown  && you have to clear the shutdown handler out of the system

_screen.BackColor = rgb( 0, 255, 0 )
return && back to the O/S we go
>I am trying to retrieve the wParam from the tagMSG structure of Windows API GetMessage to detect the SC_CLOSE value sent when the user selects "Close CtrL+F4" from the Windows system title bar menu. However, I can not detect any form event that fires when the user opens that menu, scrolls down to the close option, and presses the "Enter" key.
>
>Does anyone know how to trap WM_SYSCOMMAND messages sent when users select options from the windows system menu on a form's title bar?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform