Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calendar control in compact framework 1.1

11 views
Skip to first unread message

sameer

unread,
Jan 25, 2007, 4:05:00 PM1/25/07
to
hi all,


Environment :
Visual studio 2003
compact Framework 1.1 :
using winforms with VB.NET :
Emulator's OS : windows CE.NET

all i want to do is use the regular calendar ( date time) controls in my
winforms compact framework develpment. i can see that the datetime control is
selected in my list of controls but i still do that see it in my IDE's
toolbar to use ? does this mean there is no datetime control at all to be
used in compact framework 1.1 with my winforms?

thanks for your answer, quick answer is highly appreciated.

thanks
Sameer

Peter Foot [MVP]

unread,
Jan 25, 2007, 4:59:32 PM1/25/07
to
The DateTimePicker was not included with .NETCF v1.0, there are third party
examples, for example theres one in the Smart Device Framework v1.4 -
www.opennetcf.org/sdf/

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com

"sameer" <sam...@discussions.microsoft.com> wrote in message
news:5E225E1B-A231-4930...@microsoft.com...

sameer

unread,
Jan 25, 2007, 5:27:01 PM1/25/07
to
hmm, that is strange. So there is absolutely no way other then thrid party
control. How has your experience been with this Smart Device Framework v1.4 ?
i am right at the final moment of a deadline and this news is definelty not
good. got two questions for you

1.while doing the develpment i used text boxes just to get it gong, now
when i am replacing it with these controls , hope it is going to be very easy
transition. Please state your experience.

2. Also how does the deployment work, i am hoping that i will jsut have to
include this in my compact framework project and while deployment just copy
this control to barcode scanner with the appilcation it should just work,
Please let me know .

thanks

Peter Foot [MVP]

unread,
Jan 26, 2007, 4:07:59 AM1/26/07
to
That's correct, there is however a DateTimePicker and MonthCalendar control
in .NETCF v2.0. Since I wrote many of the Smart Device Framework features my
experiences are rather biased :-) You'll find it invaluable, not just for
the DateTimePicker but lots of other classes and controls which are missing
in .NETCF v1.0 which you'll be used to using on the desktop. It's packaged
as a .cab file which you install along with your application which will
install all the SDF .dlls.

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com

"sameer" <sam...@discussions.microsoft.com> wrote in message

news:0FBB6A62-DCF9-4B65...@microsoft.com...

sameer

unread,
Jan 31, 2007, 1:09:00 AM1/31/07
to
Peter, i am using the datetimepicker controls from opennetcf and seems i am
at a dead end and here is the problem.

the only way to indicate that no value has been selected in the
datetimepicker is to set the showcheckbox property to true and make use of
it. but the strange part is that when i am using this on a panel ( and i am
using panels all over the form) no matter how many times i set the
showcheckbox property =true , it does not show the checkbox in the
datetimepicker control. Now just that the same behavior applies to the
showupdown property as well i.e no matter how many tmies i set it when it is
palced on a panel control, it does not show it. If it is placed on a form it
is visible.

do u ever come across this problem , if so how did you handle this?

sameer

unread,
Jan 31, 2007, 1:11:01 AM1/31/07
to
Also btw do you suggest any other third party control which might provide a
better datetimepicker control then this? thanks

David

unread,
Feb 8, 2007, 11:18:01 AM2/8/07
to
Sameer,

I ran into what's probably the same problem. It seems to occur if you set
the the property after the DateTimePicker has already been drawn. It doesn't
redraw itself with the checkbox.

To fix it, I added the following code to the end of SetDTPStyle method in
DateTimePicker.cs:

if (this.Parent != null)
UpdateControlStyle();

And this new method:

private void UpdateControlStyle()
{
IntPtr hwnd = this.ChildHandle;
int style = Win32Window.GetWindowLong(hwnd, (int)GWL.STYLE);
style &= ~0x000000FF;
style |= this.m_style;
Win32Window.SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP.HIDEWINDOW
| SWP.NOMOVE | SWP.NOZORDER | SWP.NOSIZE | SWP.NOACTIVATE |
SWP.FRAMECHANGED);
Win32Window.SetWindowLong(hwnd, (int)GWL.STYLE, style);
Win32Window.SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP.SHOWWINDOW
| SWP.NOMOVE | SWP.NOZORDER | SWP.NOSIZE | SWP.NOACTIVATE |
SWP.FRAMECHANGED);
}

(You could probably use ShowWindow instead of SetWindowPos, but it's not
defined in Win32Window.)

--
David

sameer

unread,
Feb 8, 2007, 5:39:00 PM2/8/07
to
does any body suggest any other third party control which might provide a
better datetimepicker control then this? thanks

Alexey

unread,
Nov 2, 2009, 12:57:52 PM11/2/09
to
Standart calendar control from compact framework has quite poor functinality. Try to use MobiDev calendar evaluation version. It could be found on http://www.mobi-dev.com/products.html site.

From http://www.developmentnow.com/g/18_2007_1_0_0_912895/Calendar-control-in-compact-framework-1-1.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

0 new messages