﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Issues  » Error occur when pressing delete key to clear the date value of the datetimepicker control</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 07:48:47 GMT</lastBuildDate><ttl>20</ttl><item><title>Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost15994.aspx</link><description>Hi Strataframe Team,&lt;/P&gt;&lt;P&gt;After I upgraded to the 1.6.5, I get the error below when I press the delete key to clear the&amp;nbsp;date value&amp;nbsp;of the datetimepicker control which is bound to a date field of a business object.&amp;nbsp;&amp;nbsp; Although I get this error, the database is being updated properly.&amp;nbsp; Why is this error is occurring?&lt;/P&gt;&lt;P&gt;=======================================================================&lt;/P&gt;&lt;P&gt;Object reference not set to an instance of an object.&lt;BR&gt;&amp;nbsp; Exception (NullReferenceException): Source="MicroFour StrataFrame UI"; Target=null; Tag=null; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Message = "Object reference not set to an instance of an object."&lt;BR&gt;&amp;nbsp; Environment: ThreadIdentity="" DateTime=["2008-04-29 16:31:15.908"] ThreadName=null WindowsIdentity="STRUSS\JPagley" ThreadId="10" DomainName="CMPR.vshost.exe" OSVersion=["Microsoft Windows NT 5.1.2600 Service Pack 2"] MachineName="1LPJPAGLEY"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserName="JPagley"&lt;BR&gt;&amp;nbsp; Remaining Stack Trace&amp;nbsp; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.DateTimePicker.CreateManualCaret()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.DateTimePicker.OnGotFocus(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmSetFocus(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.DateTimePicker.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</description><pubDate>Wed, 30 Apr 2008 10:36:39 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost16029.aspx</link><description>Cool :cool:</description><pubDate>Wed, 30 Apr 2008 10:36:39 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost16027.aspx</link><description>Hi Trent,&lt;/P&gt;&lt;P&gt;The new assembly also fixed the datetimepicker problem for me.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;jjp</description><pubDate>Wed, 30 Apr 2008 10:28:39 GMT</pubDate><dc:creator>Jeff Pagley</dc:creator></item><item><title>RE: Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost16019.aspx</link><description>Look here: &lt;A href="http://forum.strataframe.net/FindPost16017.aspx"&gt;http://forum.strataframe.net/FindPost16017.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I didn't run&amp;nbsp;your sample as I already knew what you were trying to accomplish, so I haven't even tested it at this point.&amp;nbsp; But you can load the assembly and see if you get what you want.</description><pubDate>Wed, 30 Apr 2008 10:01:03 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost16018.aspx</link><description>[quote][b]Trent L. Taylor (04/30/2008)[/b][hr]I saw something that could produce an error within certain environments.&amp;nbsp; Give this assembly a shot...I think that it will resolve your problems.&amp;nbsp; It had to do with how the API interprets bitmaps and the integer pointer.&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; You will need to be on the 1.6.6 beta in order for this assembly to properly work.[/quote]&lt;P&gt;Hi Trent,&lt;P&gt;Yes, this assembly fixed the datetimepicker delete value problem.&lt;P&gt;Thanks.&lt;P&gt;P.S.&lt;P&gt;Where you able to test the 2nd form for the ListView issue? even thought it does not belong to this thread :)</description><pubDate>Wed, 30 Apr 2008 09:59:08 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost16016.aspx</link><description>I saw something that could produce an error within certain environments.&amp;nbsp; Give this assembly a shot...I think that it will resolve your problems.&amp;nbsp; It had to do with how the API interprets bitmaps and the integer pointer.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; You will need to be on the 1.6.6 beta in order for this assembly to properly work.</description><pubDate>Wed, 30 Apr 2008 09:40:42 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost16015.aspx</link><description>Hi Trent,&lt;P&gt;Here is a 2 for 1 quick sample project :hehe:&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;You will find 2 forms, one for testing the datetime picker problem when you try to delete its value and the other will show you the problem with the ListView Add button which will always stay Enabled when there is not parent record.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description><pubDate>Wed, 30 Apr 2008 08:14:30 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost16014.aspx</link><description>V64 doesn't make any difference.&amp;nbsp; I haven't had any luck with the issue that you are running into...however I did find something that I had to fix :D&amp;nbsp; Give me a quick sample that reproduces the issue so I know that the properties are set the same....sometimes it is just a matter of setting up the test bed the same.&amp;nbsp; Thanks.</description><pubDate>Tue, 29 Apr 2008 22:32:51 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost16010.aspx</link><description>Hi Trent,&lt;P&gt;FYI, I also got this one.&amp;nbsp; I am running Windows Vista 64.&amp;nbsp; I have not tried your solution since&amp;nbsp;I really don't know how to&amp;nbsp;build the dll from the source code without messing the current SF installation.&lt;/P&gt;&lt;P&gt;[quote][codesnippet]NullReferenceException&lt;BR&gt;&amp;nbsp; Object reference not set to an instance of an object.&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : MicroFour StrataFrame UI&lt;/P&gt;&lt;P&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.DateTimePicker.CreateManualCaret()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.DateTimePicker.OnGotFocus(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmSetFocus(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.DateTimePicker.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;BR&gt;[/codesnippet][/quote]</description><pubDate>Tue, 29 Apr 2008 21:19:35 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Error occur when pressing delete key to clear the date value of the datetimepicker control</title><link>http://forum.strataframe.net/FindPost15997.aspx</link><description>A lot of logic was added to the DateTimePicker in 1.6.5 to make entry available while "cleared."&amp;nbsp; It looks like you are having an API issue.&amp;nbsp; We call the Windows API to create a Caret and display it within the control...it would appear that your environment doesn't like this API call.&amp;nbsp; You can open the source and comment out this line (CreateManualCaret) to see if the error persists since this is where your stack trace stops.</description><pubDate>Tue, 29 Apr 2008 16:05:29 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>