<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.foxite.com/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rino Veryser</title><link>http://weblogs.foxite.com/rinoveryser/default.aspx</link><description>DO blogging</description><dc:language>nl-BE</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>DateSerial in VFP</title><link>http://weblogs.foxite.com/rinoveryser/archive/2005/12/20/1051.aspx</link><pubDate>Tue, 20 Dec 2005 15:04:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:1051</guid><dc:creator>rveryser</dc:creator><slash:comments>1</slash:comments><comments>http://weblogs.foxite.com/rinoveryser/comments/1051.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/rinoveryser/commentrss.aspx?PostID=1051</wfw:commentRss><description>Hi,
&lt;br&gt;&lt;br&gt;
Updated version of DATESERIAL in VFP (thanks to Sietse Wijnker)!
&lt;br&gt;&lt;br&gt;
Try this:&lt;br&gt;&lt;br&gt;
Functionality differs in the passing of negative numbers as the days parameters. Other than that, it's the same but much, much less code&lt;br&gt;&lt;br&gt;
FUNCTION _DateSerial(tnYear, tnMonth, tnDay)&lt;br&gt;
IF NOT BETWEEN(tnYear, 100, 9999)&lt;br&gt;
RETURN .NULL.&lt;br&gt;
ENDIF&lt;br&gt;
*- Create a base date. Jan 1st in the passed year&lt;br&gt;
ldDate = DATE(tnYear, 1, 1)&lt;br&gt;
*- Add the amount of months to the base-date. If the tnMont is negative, the nr of months will be subtracted&lt;br&gt;
ldDate = GOMONTH(ldDate, (tnMonth - 1))&lt;br&gt;
*- Add the nr of days. Negative nr of days will subtract&lt;br&gt;
ldDate = ldDate + (tnDay - 1)&lt;br&gt;
*- Return the date (DD.MM.YYYY)&lt;br&gt;
RETURN TRANSFORM(DAY(ldDate)) + "." + TRANSFORM(MONTH(ldDate)) + "." + TRANSFORM(YEAR(ldDate))&lt;br&gt;
ENDFUNC &lt;br&gt;&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=1051" width="1" height="1"&gt;</description><category domain="http://weblogs.foxite.com/rinoveryser/archive/category/52.aspx">VFP</category></item><item><title>Sniff your MSXML parser</title><link>http://weblogs.foxite.com/rinoveryser/archive/2005/04/06/338.aspx</link><pubDate>Wed, 06 Apr 2005 12:26:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:338</guid><dc:creator>rveryser</dc:creator><slash:comments>0</slash:comments><comments>http://weblogs.foxite.com/rinoveryser/comments/338.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/rinoveryser/commentrss.aspx?PostID=338</wfw:commentRss><description>I like XML and I like VFP! So, I was very excited about the new possibilities in the new versions of VFP concerning XML.&lt;BR&gt;&lt;BR&gt;
But when I installed my application on a client computer, the great function XMLTOCURSOR() didn't work!!! &lt;BR&gt;&lt;BR&gt;
To use the Visual FoxPro OLE DB Provider with XMLTOCURSOR( ), you must install MSXML 3.0 on the computer with the OLE DB Provider.&lt;BR&gt;&lt;BR&gt;
To sniff your MSXML parser on your computer, you can check this out at the following website:
&lt;a target="_blank" href="http://www.topxml.com/parsers/sniffer/"&gt;http://www.topxml.com/parsers/sniffer&lt;/a&gt;
&lt;BR&gt;&lt;BR&gt;
It requires IE6+, and I tried it with Firefox, but it doesn't work with Firefox&lt;BR&gt;&lt;BR&gt;&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=338" width="1" height="1"&gt;</description><category domain="http://weblogs.foxite.com/rinoveryser/archive/category/52.aspx">VFP</category></item><item><title>Detect Right-Click in an ActiveX Treeview Control</title><link>http://weblogs.foxite.com/rinoveryser/archive/2005/03/23/234.aspx</link><pubDate>Wed, 23 Mar 2005 21:02:00 GMT</pubDate><guid isPermaLink="false">8827bd1c-7596-4a8f-b0de-f59ce9ede522:234</guid><dc:creator>rveryser</dc:creator><slash:comments>3</slash:comments><comments>http://weblogs.foxite.com/rinoveryser/comments/234.aspx</comments><wfw:commentRss>http://weblogs.foxite.com/rinoveryser/commentrss.aspx?PostID=234</wfw:commentRss><description>My goal was to display a context-sensitive menu in response to a right-click on a treeview node, but I had a lot of problems getting there.
&lt;P&gt;
Initially, I put code in the MouseDown() event, because that has automatic access to which button was clicked. When the event fires, it receives four parameters, the first of which is 1 for the left mouse button or 2 for the right mouse button. 
&lt;P&gt;
Unfortunately, at that moment, the tree's SelectedItem property still referred to the previously selected node, not the one on which I was right-clicking.
&lt;P&gt;
I had heard that the MouseUp() event was the correct one for detecting a right-click action, and indeed, it has the same four parameters as MouseDown(), so I moved my code into that method. But now the event didn't fire, and my code didn't run at all. I put WAIT WINDOW commands in the MouseUp() and MouseDown() events to try to figure out where things were failing, and suddenly things started working; I now got the correct node with a right-click. When I removed all my debugging statements, leaving only code in the MouseUp() as before, the event once again failed to fire.
&lt;P&gt;
From my trials, it seems that MouseUp() only fires if there's some code in the MouseDown() event. This is the working solution I came up with:
&lt;P&gt;
* MouseDown event&lt;BR&gt;
LPARAMETERS nButton, nShift, nXCoord, nYCoord&lt;BR&gt;
Dummy = 0
&lt;P&gt;
* MouseUp event&lt;BR&gt;
LPARAMETERS nButton, nShift, nXCoord, nYCoord
&lt;P&gt;
ClickedKey = this.SelectedItem.Key&lt;BR&gt;
DO CASE&lt;BR&gt;
&amp;nbsp;&amp;nbsp;CASE nButton = 1 &amp;&amp; Left Click&lt;BR&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ** processing steps&gt;&lt;BR&gt;
&lt;BR&gt;
&amp;nbsp;&amp;nbsp; CASE nButton = 2 &amp;&amp; Right Click&lt;BR&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DO RightClickMenu.mpr&lt;BR&gt;
ENDCASE&lt;BR&gt;&lt;BR&gt;
&lt;P&gt;
I don't use the NodeClick event anymore, all mouse click-coding happens in the MouseUp() event.&lt;img src="http://weblogs.foxite.com/aggbug.aspx?PostID=234" width="1" height="1"&gt;</description><category domain="http://weblogs.foxite.com/rinoveryser/archive/category/52.aspx">VFP</category></item></channel></rss>