>Is there a way to automaticaly drop down the calendar in that Date Time picker?
>
>I've tried useing keyboard (like you would in dropping down a combo box) and just can not get anything to work.
>
>Thanks for input!
I've been following this thread, wondering how you'd do something like this. I did a little digging and got it working. If you haven't figured it out for yourself yet, and still want to, you might want to stop reading now. Spoiler coming ;-)
In the GotFocus() method of the control add the following code:
#DEFINE WM_KEYDOWN 0x0100
#DEFINE VK_F4 0x73
hWnd = THISFORM.OleControl1.hWnd
=SendMessage(hWnd, WM_KEYDOWN, VK_F4, 0)
You'll also need to add the DEFINE somewhere for the SendMessage API call. I put it in my MAIN.PRG, but you can put it just about anywhere as long as it's set-up before it's used:
DECLARE INTEGER SendMessage IN WIN32API ;
INTEGER hWnd, ;
INTEGER Msg, ;
INTEGER wParameter, ;
INTEGER lParameter
What's a little non-obvious about the above is that hWnd is a hidden property of the control. I found lot's of threads about getting the window's Hwnd, not so many about getting a control's. After a little digging I found another thread that mentioned that little tidbit. I read (and reread) Ed & Mike's messages before figuring out the rest of it. HTH