Need DateSelected event in MonthCalendar control in CF 2.0

L

Lonifasiko

CF 2.0 does not publish DateSelected method in MontCalendar control. CF
1.0 did it and worked perfectly, but incredibly this event has not been
included in CF 2.0.

We now have got a DateChanged event, but I don't like this event
because fires also when rigth/left arrows are clicked. I need
DateSelected event, which only fired when user clicked a date inside
the calendar, not also clicking the arrows.

How could I achieve CF 1.0.'s behaviour with Monthcalendar control in
CF 2.0? I need something equal or that imitates that behaviour.

Thanks in advance.
 
P

Peter Foot [MVP]

Because .NETCF v2.0 now supports functions as delegates it's possible to
handle windows messages from native controls (without hosting them in an
altered MessageWindow -
http://www.peterfoot.net/HostingANativeWindowsControlLiveOnMSDN.aspx). Alex
Yakhnin has an example on his blog to extend the v2.0 ComboBox class, you
can use the same approach with the DateTimePicker/MonthCalendar
functionality:-
http://blog.opennetcf.org/ayakhnin/PermaLink.aspx?guid=9a6a541c-9109-4748-b3e0-6f8d0ed2f95f

In v1.0 there was neither a DateTimePicker or MonthCalendar control, I wrote
the OpenNETCF ones using the technique described in the MSDN article
referenced above. You can refer to the OpenNETCF source to see the
definitions of the messages etc.

Peter
 
L

Lonifasiko

Thanks Peter, I'll try following your suggestion but I think MS should
consider including this event in future Service Packs.

I know CF 1.0 does not include MonthCalendar and DateTimePicker and
I've been playing with OpenNETCF but the limitation I see is that I
cannot change MonthCalendar size to be more bigger. With CF 2.0.'s
MonthCalendar, by changing the font of the calendar, calendar shows
bigger in the form. I know it's a little strange but works and I need
that behaviour. MonthCalendar control of OpenNETCF does not have this
behaviour.

Now, after hearing my explanation, and after MS knowing that
MonthCalendar control from OpenNETCF publishes DateSelected event, do
you see it normal not to include this event in the MonthCalendar
control?

One more time, thanks Peter.
 
L

Lonifasiko

Daniel, do you remember the post about me saying that Date_Selected not
inclusion was a bug? See what MS has replied to me:

"Miguel,

Thank you for contacting the .NET Framework team. We appreciate your
comments. By taking the time to write, you are helping us to improve
the quality of our documentation and samples.

The version of VS.NET 2005 installed on my machine is slightly newer
than the Beta2 release, but the DateSelected event is visible both in
the designer and the code editor. If for some reason this event
wasn't showing up, it has now been fixed."

I therefore understand RC versions do include DateSelected event and so
will do VS.NET 2005's final release.
Hope this info helps you. Regards.
 
D

Daniel Moth

LOL... I can't believe you are still going on about that... Thanks for the
info, it doesn't change anything I said... Have a nice weekend!

Cheers
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top