Dawa,
Just for fun, take a look at this code:
Placing a button on the VFP form as a new child windowhttp://www.news2news.com/vfp/?example=274Not Visual FoxPro CommandButton control, but real windowed BUTTON control is created using CreateWindowEx API function and placed on FoxPro form as its child window.
Until VFP9, this trick would make absolutely no sense, since FoxPro code can not catch WM_COMMAND and WM_PARENTNOTIFY messages that button control sends to its parent window.
With VFP9 it's still not really practical :) but now BINDEVENT() can be used to start a procedure or method every time such windowed button is clicked on.