<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nl-BE"><title type="html">Rino Veryser</title><subtitle type="html">DO blogging</subtitle><id>http://weblogs.foxite.com/rinoveryser/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.foxite.com/rinoveryser/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.foxite.com/rinoveryser/atom.aspx" /><generator uri="http://communityserver.org" version="2.0.60217.2664">Community Server</generator><updated>2005-03-23T22:02:00Z</updated><entry><title>DateSerial in VFP</title><link rel="alternate" type="text/html" href="http://weblogs.foxite.com/rinoveryser/archive/2005/12/20/1051.aspx" /><id>http://weblogs.foxite.com/rinoveryser/archive/2005/12/20/1051.aspx</id><published>2005-12-20T15:04:00Z</published><updated>2005-12-20T15:04:00Z</updated><content type="html">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;</content><author><name>rveryser</name><uri>http://weblogs.foxite.com/members/rveryser.aspx</uri></author></entry><entry><title>Sniff your MSXML parser</title><link rel="alternate" type="text/html" href="http://weblogs.foxite.com/rinoveryser/archive/2005/04/06/338.aspx" /><id>http://weblogs.foxite.com/rinoveryser/archive/2005/04/06/338.aspx</id><published>2005-04-06T12:26:00Z</published><updated>2005-04-06T12:26:00Z</updated><content type="html">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;</content><author><name>rveryser</name><uri>http://weblogs.foxite.com/members/rveryser.aspx</uri></author></entry><entry><title>Detect Right-Click in an ActiveX Treeview Control</title><link rel="alternate" type="text/html" href="http://weblogs.foxite.com/rinoveryser/archive/2005/03/23/234.aspx" /><id>http://weblogs.foxite.com/rinoveryser/archive/2005/03/23/234.aspx</id><published>2005-03-23T21:02:00Z</published><updated>2005-03-23T21:02:00Z</updated><content type="html">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;</content><author><name>rveryser</name><uri>http://weblogs.foxite.com/members/rveryser.aspx</uri></author></entry></feed>