I need to Show Week Numbers. I haven't been able to show week numbers in a DTPicker, so I decided to do my own control.
I use a Command Control and a Text Control to emulate the text part and the button part of the DTPicker. When the Command Control is activated, I activate a Form (MonthViewForm) which is modeless.
The MonthViewForm is a form which has a MonthView Control on it's canvas.
The MonthViewForm is checking for the chosen date, using MonthView1_DateClicked event. When this happens, the MonthViewForm is unloaded by "Unload Me". I communicate the event to the caller of the MonthViewForm, by raising a "Done(dtDate As Date)" event.
However, my problem is to unload the MonthViewForm when hitting anything but MonthViewForm. How do I accomplish this?
I have tried to use the MonthViewForm_Deactivate(), MonthViewForm_LostFocus(), but with no good results. My current plan is to be able to send a WM_KILLFOCUS to the MonthViewForm when the form with my UserControl (MMDatePicker), gains control.
Anyone has an idea?