Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CalDate Auto Dropdown
Message
From
17/10/2003 08:27:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00839443
Message ID:
00839680
Views:
27
This message has been marked as the solution to the initial question of the thread.
>Does anyone know how to make the CalDate OCX open the calendar when the control gets focus or when a user clicks on it?
>
>Thanks

I don't know what the Caldate.ocx is but I found this works with Datetimepicker, Monthview controls. Should work with it too :
(Emulating a user clicking on dropdown arrow)
#define WM_LBUTTONDOWN 0x0201
#define WM_SYSKEYDOWN  0x0104
#define WM_SYSKEYUP    0x0105

#define VK_MENU 12
#define VK_DOWN 28

LOCAL lnHWND
LOCAL ARRAY arrDLL[1]
ADLLS(arrDLL)
IF ASCAN(arrDLL,'SendMessage',1,-1,1,1+2+4) = 0
	declare integer SendMessage IN WIN32API ;
		integer hwnd, integer Msg, integer Wparam, integer lParam 
endif	
lnHwnd = This.hWnd
*lnHwnd = Thisform.Oledatectrl.hWnd
SendMessage(lnHwnd,WM_LBUTTONDOWN,0,0)
SendMessage(lnHwnd,WM_SYSKEYDOWN,VK_MENU+VK_DOWN,0)
SendMessage(lnHwnd,WM_SYSKEYUP,VK_MENU+VK_DOWN,0)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform