G
Guest
So with OpenNETCF 1.2 we had the DateTimePicker. Its “Checked†property did
not work but we had the following code that we could use to uncheck it:
int DTM_SETSYSTEMTIME = 0x1002;
int GDT_NONE = 1;
foreach( Control c in this.Controls )
{
if( c.GetType() == typeof( DateTimePicker )){
Win32Window.SendMessage(
(IntPtr) ( Win32Window.GetWindow((IntPtr)Win32Window.FromControl(
c ),
Win32Window.GetWindowParam.GW_CHILD )),
DTM_SETSYSTEMTIME, GDT_NONE, 0 );
}
}
With the advent of OpenNETCF 1.3 we must change the
Win32Window.GetWindowParam.GW_CHILD statement to OpenNETCF.Win32.GW.CHILD in
order to get things to compile and run. Unfortunately however, this code no
longer unchecks the checkboxes though. I would also note that if you go to
the property window and set the Checked property from true to false that
OpenNETCF produces the following compile error:
“'OpenNETCF.Windows.Forms.DateTimePicker' does not contain a definition for
'Checked'â€.
So what has been changed with the DateTimePicker in the new version and is
there another way to programmatically control the state of its check boxes
that works with 1.3?
Bill
not work but we had the following code that we could use to uncheck it:
int DTM_SETSYSTEMTIME = 0x1002;
int GDT_NONE = 1;
foreach( Control c in this.Controls )
{
if( c.GetType() == typeof( DateTimePicker )){
Win32Window.SendMessage(
(IntPtr) ( Win32Window.GetWindow((IntPtr)Win32Window.FromControl(
c ),
Win32Window.GetWindowParam.GW_CHILD )),
DTM_SETSYSTEMTIME, GDT_NONE, 0 );
}
}
With the advent of OpenNETCF 1.3 we must change the
Win32Window.GetWindowParam.GW_CHILD statement to OpenNETCF.Win32.GW.CHILD in
order to get things to compile and run. Unfortunately however, this code no
longer unchecks the checkboxes though. I would also note that if you go to
the property window and set the Checked property from true to false that
OpenNETCF produces the following compile error:
“'OpenNETCF.Windows.Forms.DateTimePicker' does not contain a definition for
'Checked'â€.
So what has been changed with the DateTimePicker in the new version and is
there another way to programmatically control the state of its check boxes
that works with 1.3?
Bill