<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Neil Smith</title>
        <link>http://geekswithblogs.net/ntsmith/Default.aspx</link>
        <description>[blog]code til ur fingers bleed</description>
        <language>en-US</language>
        <copyright>Neil Smith</copyright>
        <managingEditor>neil@herefordsoftwaresolutions.co.uk</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Neil Smith</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/ntsmith/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>SQL Server-Determine which query is taking a long time to complete</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2011/11/09/147638.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;  &lt;p&gt;Cool little trick to determine which sql query which is taking a long time to execute, first while offending query is running from another machine do&lt;/p&gt;  &lt;p&gt;&lt;font style="background-color: #ffffff" color="#0000ff"&gt;EXEC&lt;/font&gt; &lt;font color="#c0504d"&gt;sp_who2&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;Locate the SPID responsible via Login, DBName and ProgramName columns, then do&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;DBCC&lt;/font&gt; INPUTBUFFER (&lt;font color="#4f81bd"&gt;&amp;lt;SPID&amp;gt;&lt;/font&gt;)&lt;/p&gt;  &lt;p&gt;The offending query will be in the EventInfo column.  This is a great little time saver for me, before I found out about this I used to split my concatenated query script in to multiple sql files until I located the problem query&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/147638.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2011/11/09/147638.aspx</guid>
            <pubDate>Thu, 10 Nov 2011 04:30:20 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/147638.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2011/11/09/147638.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/147638.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/147638.aspx</trackback:ping>
        </item>
        <item>
            <title>Umbraco 4.0.x.x UComment 1.0</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2011/04/29/145081.aspx</link>
            <description>&lt;p&gt;If you have a web site using Umbraco and you wish to add the ability to comment on submitted articles then UComment is a quite brilliant little package, the functionality can be added in no time at all.  My problem was that the web site in question uses Umbraco 4.0.x.x and I couldn’t upgrade to the most recent (4.7 at the time of writing) due to not being able to back up the database before I begin (shared web hosting).&lt;/p&gt;  &lt;p&gt;This meant I was forced in to using UComment 1.0 because 1.1 is tied to Umbraco 4.5 and 1.2 is tied to Umbraco 4.7 etc.. so I downloaded the 1.0 Umbraco package and installed it.  Unfortunately there are bugs in UComment 1.0 to do with page validation and the forcing of the user to enter a web site address before they can post anything.  The comment form would not pass validation checks for .co.uk, .org, .org.uk and lots of other possible domains.  I have modified the UComment 1.0 c# source code to fix these issues, and compiled the UComment.dll assembly for .net 3.5, the project can be &lt;a href="http://www.herefordsoftwaresolutions.co.uk/Ucomment1.0_HSS.zip"&gt;downloaded from here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Might save someone somewhere some work &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://geekswithblogs.net/images/geekswithblogs_net/ntsmith/Windows-Live-Writer/Umbraco-4.0.x.x_F7C5/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/145081.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2011/04/29/145081.aspx</guid>
            <pubDate>Fri, 29 Apr 2011 23:59:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/145081.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2011/04/29/145081.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/145081.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/145081.aspx</trackback:ping>
        </item>
        <item>
            <title>Sql Server search stored procs for text</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2010/03/03/138316.aspx</link>
            <description>&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt;   &lt;p&gt;&lt;font color="#000000"&gt;Search all stored procedures in a database for a string&lt;/font&gt;&lt;/p&gt; &lt;/span&gt;  &lt;p style="margin: 0cm 0cm 0pt" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt;SELECT&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt; routine_name&lt;span style="color: gray"&gt;,&lt;/span&gt; routine_definition  &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0cm 0cm 0pt" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt;FROM&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt; &lt;span style="color: green"&gt;information_schema.routines       &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0cm 0cm 0pt" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt;WHERE&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt; routine_definition &lt;span style="color: gray"&gt;LIKE&lt;/span&gt; &lt;span style="color: red"&gt;'%textyoursearchingfor%'       &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0cm 0cm 0pt" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: gray; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt;AND&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-ansi-language: en-us" lang="EN-US"&gt; routine_type &lt;span style="color: gray"&gt;=&lt;/span&gt; &lt;span style="color: red"&gt;'PROCEDURE'       &lt;p&gt;&lt;/p&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/138316.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2010/03/03/138316.aspx</guid>
            <pubDate>Thu, 04 Mar 2010 04:55:08 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/138316.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2010/03/03/138316.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/138316.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/138316.aspx</trackback:ping>
        </item>
        <item>
            <title>MCTS 70-536 Exam</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2009/06/18/132897.aspx</link>
            <description>&lt;p&gt;Three months of hard work paid off today and I scored 982 out of 1000, would love to know on which question I lost those 18 points…&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/132897.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2009/06/18/132897.aspx</guid>
            <pubDate>Thu, 18 Jun 2009 19:14:38 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/132897.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2009/06/18/132897.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/132897.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/132897.aspx</trackback:ping>
        </item>
        <item>
            <title>Regular VS IDE Colour Scheme Changes Improve Productivity..</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2009/03/07/129903.aspx</link>
            <description>&lt;p&gt;.. maybe / maybe not.  I've collected / created lots of colour scheme .vssettings xml files over the years, &lt;a href="http://www.herefordsoftwaresolutions.co.uk/NeilsVSSettings.zip"&gt;here&lt;/a&gt; are some of my favourites... enjoy!&lt;/p&gt;  &lt;p&gt;All files are guaranteed to only contain settings for the All Settings-&amp;gt;Options-&amp;gt;Environment-&amp;gt;Fonts and Colours so the rest of your visual studio settings remain untouched.  All files are in VS2008 format though they can be edited to work with VS2005 by editing the line :-&lt;/p&gt;  &lt;p&gt;&amp;lt;ApplicationIdentity version="9.0" /&amp;gt;&lt;/p&gt;  &lt;p&gt;to read&lt;/p&gt;  &lt;p&gt;&amp;lt;ApplicationIdentity version="8.0" /&amp;gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/129903.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2009/03/07/129903.aspx</guid>
            <pubDate>Sat, 07 Mar 2009 13:47:18 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/129903.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2009/03/07/129903.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/129903.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/129903.aspx</trackback:ping>
        </item>
        <item>
            <title>Agent Ransack</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2008/11/14/127027.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;Just discovered this great piece of free software from mythicsoft, it is a cut down version of a product called File Locator Pro. It is clearly aimed at software developers and is great for finding files which contain certain strings / lines of code.  Prior to finding this program I had been using source code modified from http://www.codeproject.com/KB/cs/fulltextsearchingifinters.aspx to suit my needs, the results are good but not as good as agent ransack, give it a try :-&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;http://www.mythicsoft.com/agentransack/download.aspx&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Great new look to the site btw&lt;/font&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/127027.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2008/11/14/127027.aspx</guid>
            <pubDate>Fri, 14 Nov 2008 16:01:22 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/127027.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2008/11/14/127027.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/127027.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/127027.aspx</trackback:ping>
        </item>
        <item>
            <title>Directory.GetFiles() in Modified Date/Time Order Pt2</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2008/07/10/123732.aspx</link>
            <description>&lt;p&gt;Following on from &lt;a href="http://geekswithblogs.net/ntsmith/archive/2006/08/17/88250.aspx" target="_blank"&gt;this&lt;/a&gt;.  I've noticed that it only gives you to the second accuracy.  If your software is capable of making more than one file per second, the sort order will be date/time to the second then alphanumerically on the filename.  Not ideal if your filenames are guids, the following class gives date/time sort accuracy of 100 nanosecond intervals then alphanumerically on filename :-&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; &lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;style type="text/css"&gt;&lt;![CDATA[

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.IO&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.Runtime.InteropServices&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; System.Runtime.InteropServices.ComTypes&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; Microsoft.Win32.SafeHandles&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;Imports&lt;/span&gt; Microsoft.Win32&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Class&lt;/span&gt; clsCompareFileInfo&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Implements&lt;/span&gt; IComparer&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Const&lt;/span&gt; GENERIC_READ = &amp;amp;H80000000&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Const&lt;/span&gt; OPEN_EXISTING = 3&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Const&lt;/span&gt; FILE_SHARE_READ = &amp;amp;H1&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Const&lt;/span&gt; FILE_SHARE_WRITE = &amp;amp;H2&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Const&lt;/span&gt; FILE_ATTRIBUTE_NORMAL = &amp;amp;H80&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Const&lt;/span&gt; FILE_FLAG_NO_BUFFERING = &amp;amp;H20000000&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Structure&lt;/span&gt; FILETIME&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Public&lt;/span&gt; dwLowDateTime &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Long&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Public&lt;/span&gt; dwHighDateTime &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Long&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Structure&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Declare&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; GetFileTime &lt;span class="kwrd"&gt;Lib&lt;/span&gt; &lt;span class="str"&gt;"kernel32"&lt;/span&gt; (&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; hFile &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;, &lt;span class="kwrd"&gt;ByRef&lt;/span&gt; lpCreationTime &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME, &lt;span class="kwrd"&gt;ByRef&lt;/span&gt; lpLastAccessTime &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME, &lt;span class="kwrd"&gt;ByRef&lt;/span&gt; lpLastWriteTime &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME) &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Declare&lt;/span&gt; &lt;span class="kwrd"&gt;Auto&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; CreateFile &lt;span class="kwrd"&gt;Lib&lt;/span&gt; &lt;span class="str"&gt;"kernel32.dll"&lt;/span&gt; (&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; lpFileName &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;, _&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; dwDesiredAccess &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; dwShareMode &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;, _&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; lpSecurityAttributes &lt;span class="kwrd"&gt;As&lt;/span&gt; IntPtr, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; dwCreationDisposition &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;, _&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; dwFlagsAndAttributes &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; hTemplateFile &lt;span class="kwrd"&gt;As&lt;/span&gt; IntPtr) &lt;span class="kwrd"&gt;As&lt;/span&gt; IntPtr&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; &lt;span class="kwrd"&gt;Declare&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; CloseHandle &lt;span class="kwrd"&gt;Lib&lt;/span&gt; &lt;span class="str"&gt;"kernel32"&lt;/span&gt; (&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; hObject &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Long&lt;/span&gt;) &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Long&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;    &amp;lt;DllImport( _&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;                &lt;span class="str"&gt;"kernel32.dll"&lt;/span&gt;, _&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;                CharSet:=CharSet.&lt;span class="kwrd"&gt;Auto&lt;/span&gt;, _&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;                SetLastError:=&lt;span class="kwrd"&gt;True&lt;/span&gt;)&amp;gt; _&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;            &lt;span class="kwrd"&gt;Friend&lt;/span&gt; &lt;span class="kwrd"&gt;Shared&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; CompareFileTime( _&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;            &lt;span class="kwrd"&gt;ByRef&lt;/span&gt; lpFileTime1 &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME, _&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;            &lt;span class="kwrd"&gt;ByRef&lt;/span&gt; lpFileTime2 &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME) _&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;            &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  37:  &lt;/span&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  38:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  39:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; Compare(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; x &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Object&lt;/span&gt;, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; y &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Object&lt;/span&gt;) &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Integer&lt;/span&gt; &lt;span class="kwrd"&gt;Implements&lt;/span&gt; System.Collections.IComparer.Compare&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  40:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; File1 &lt;span class="kwrd"&gt;As&lt;/span&gt; FileInfo&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  41:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; File2 &lt;span class="kwrd"&gt;As&lt;/span&gt; FileInfo&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  42:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  43:  &lt;/span&gt;        File1 = &lt;span class="kwrd"&gt;DirectCast&lt;/span&gt;(x, FileInfo)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  44:  &lt;/span&gt;        File2 = &lt;span class="kwrd"&gt;DirectCast&lt;/span&gt;(y, FileInfo)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  45:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  46:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; x_Created &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  47:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; x_Modified &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  48:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; x_Accessed &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  49:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; y_Created &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  50:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; y_Modified &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  51:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; y_Accessed &lt;span class="kwrd"&gt;As&lt;/span&gt; ComTypes.FILETIME&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  52:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  53:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; fhandle &lt;span class="kwrd"&gt;As&lt;/span&gt; IntPtr = CreateFile(File1.FullName, GENERIC_READ, FILE_SHARE_READ &lt;span class="kwrd"&gt;Or&lt;/span&gt; FILE_SHARE_WRITE, IntPtr.Zero, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, IntPtr.Zero)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  54:  &lt;/span&gt;        GetFileTime(fhandle, x_Created, x_Accessed, x_Modified)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  55:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  56:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; fhandle2 &lt;span class="kwrd"&gt;As&lt;/span&gt; IntPtr = CreateFile(File2.FullName, GENERIC_READ, FILE_SHARE_READ &lt;span class="kwrd"&gt;Or&lt;/span&gt; FILE_SHARE_WRITE, IntPtr.Zero, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, IntPtr.Zero)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  57:  &lt;/span&gt;        GetFileTime(fhandle2, y_Created, y_Accessed, y_Modified)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  58:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  59:  &lt;/span&gt;        CloseHandle(fhandle)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  60:  &lt;/span&gt;        CloseHandle(fhandle2)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  61:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  62:  &lt;/span&gt;        Compare = CompareFileTime(x_Modified, y_Modified)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  63:  &lt;/span&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  64:  &lt;/span&gt;&lt;span class="kwrd"&gt;End&lt;/span&gt; Class&lt;/pre&gt;
&lt;/div&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/123732.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2008/07/10/123732.aspx</guid>
            <pubDate>Fri, 11 Jul 2008 09:19:08 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/123732.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2008/07/10/123732.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/123732.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/123732.aspx</trackback:ping>
        </item>
        <item>
            <title>SBS2003, ISA Server &amp;amp; 550 FTP errors</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2008/04/17/121318.aspx</link>
            <description>&lt;p&gt;Given the time (nearly 2 days!) it's taken me to get to the bottom of this I thought it worthy of a blog post hopefully saving someone the hours of frustration i've just been through.  I know my FTP code works very well, around 50 different customer sites with very few support calls confirm this, on this one installation however my xml documents would not arrive at the web server.  My logging code confirmed that we were connecting to the server ok, successfully managing to cwd to the appropriate directory yet sending the file would fail with a 550 error code, same results from the server and any machine on the domain.  &lt;/p&gt;  &lt;p&gt;My customers hardware supplier assured me they'd adjusted the firewall to allow ftp and it must be my codes fault, not so, after dialling in to the server and looking at the firewall rules within isa management console, you can right click the firewall rules, choose configure and a dialog will appear with a solitary check box "Read only" which defaults to ticked when adding ftp rules, un-tick that, restart and it all worked.&lt;/p&gt;  &lt;p&gt;Their hardware company had convinced me it must be my code, I ended up installing visual studio on one of their machines to step through my code convinced it must be a bug.  Not happy when I found out my code was fine and i'd been pulling my hair out because of their incompetence, anyway, I hope this helps someone out...&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/121318.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2008/04/17/121318.aspx</guid>
            <pubDate>Thu, 17 Apr 2008 18:49:10 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/121318.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2008/04/17/121318.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/121318.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/121318.aspx</trackback:ping>
        </item>
        <item>
            <title>Sh!teware</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2008/03/13/120540.aspx</link>
            <description>&lt;p&gt;A pet hate of mine (one of many :-j) is bloated software, especially device drivers you know the sort of thing installing a printer requiring hundreds of mb disk space and adding system tray applets (HP?), I collectively refer to this stuff as shiteware something needs to be done, it's getting worse.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.physorg.com/news124646014.html"&gt;This&lt;/a&gt; (&lt;a href="http://www.physorg.com/news124646014.html"&gt;http://www.physorg.com/news124646014.html&lt;/a&gt;) sort of thing was inevitable, of course it's easy to sort out but it's just becoming such a pain time wise.  Laws need to be put in place and people need to be made accountable (strung up and tortured). &amp;lt;/rant&amp;gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/120540.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2008/03/13/120540.aspx</guid>
            <pubDate>Fri, 14 Mar 2008 09:57:28 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/120540.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2008/03/13/120540.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/120540.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/120540.aspx</trackback:ping>
        </item>
        <item>
            <title>Happy birthday...</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2008/02/26/119983.aspx</link>
            <description>Today marks the second birthday of my xbox 360 and it's still going strong.  Since day one it's stood vertically and hasn't been moved an inch.  In these days of rrod ridden horror stories I thought i'd share... &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/119983.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2008/02/26/119983.aspx</guid>
            <pubDate>Wed, 27 Feb 2008 01:36:49 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/119983.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2008/02/26/119983.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/119983.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/119983.aspx</trackback:ping>
        </item>
        <item>
            <title>USB3</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2008/01/13/118504.aspx</link>
            <description>&lt;p&gt;&lt;img height="340" alt="USB 3" width="390" src="http://www.herefordsoftwaresolutions.co.uk/usb_3_5.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;http://www.reghardware.co.uk/2008/01/09/ces_usb_3_revealed/&lt;/font&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/118504.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2008/01/13/118504.aspx</guid>
            <pubDate>Mon, 14 Jan 2008 02:42:18 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/118504.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2008/01/13/118504.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/118504.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/118504.aspx</trackback:ping>
        </item>
        <item>
            <title>UserControl actually has OnTextChanged event</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2008/01/04/118259.aspx</link>
            <description> &lt;span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Wow, didn't know that adding&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;
&lt;p&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;[&lt;span style="COLOR: #2b91af"&gt;Browsable&lt;/span&gt;(&lt;span style="COLOR: blue"&gt;true&lt;/span&gt;), &lt;span style="COLOR: #2b91af"&gt;EditorBrowsable&lt;/span&gt;(&lt;span style="COLOR: #2b91af"&gt;EditorBrowsableState&lt;/span&gt;.Always)]&lt;br /&gt;
&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;new&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;event&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;EventHandler&lt;/span&gt; TextChanged&lt;br /&gt;
&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;{&lt;br /&gt;
&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;add &lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;{&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;base&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;.TextChanged += &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;}&lt;br /&gt;
&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;remove &lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;{&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;base&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;.TextChanged -= &lt;span style="COLOR: blue"&gt;value&lt;/span&gt;;&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;}&lt;br /&gt;
&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;private&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; txtbox1_TextChanged(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; sender, &lt;span style="COLOR: #2b91af"&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;
&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;{&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'"&gt;base&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;.OnTextChanged(e);&lt;/span&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Actually gives a textbox based usercontrol a TextChanged event at design time, much nicer than other methods i've used previously.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/118259.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2008/01/04/118259.aspx</guid>
            <pubDate>Sat, 05 Jan 2008 04:19:35 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/118259.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2008/01/04/118259.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/118259.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/118259.aspx</trackback:ping>
        </item>
        <item>
            <title>Cubase 4.1 is here!</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2007/10/24/116283.aspx</link>
            <description>&lt;p&gt;and its good, knocked this up quickly to play with new sidechaining and other features&lt;img alt="" src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/teeth_smile.gif" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;http://www.herefordsoftwaresolutions.co.uk/Rightism.mp3&lt;/font&gt;&lt;a href="http://www"&gt;&lt;/a&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/116283.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2007/10/24/116283.aspx</guid>
            <pubDate>Wed, 24 Oct 2007 19:06:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/116283.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2007/10/24/116283.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/116283.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/116283.aspx</trackback:ping>
        </item>
        <item>
            <title>Been a while :-)</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2007/07/18/114014.aspx</link>
            <description>&lt;p&gt;Hi there, been a while since posting though I do read GWB most days.  Involved in a number of new projects and looking to get back into my blogging.  Got an ancient vb6 app with lots of datagrids bound to adodc controls and need to add mousewheel support, customers are moaning that it doesn't support mouse wheels, the fact that vb6 pre dates mouse wheels doesn't wash.. anyway, someone might find it useful so here it is :-&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Private Declare Function CallWindowProc Lib "user32.dll" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long&lt;br /&gt;
Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" ( _&lt;br /&gt;
ByVal hWnd As Long, _&lt;br /&gt;
ByVal nIndex As Long, _&lt;br /&gt;
ByVal dwNewLong As Long) As Long&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Public Const MK_CONTROL = &amp;amp;H8&lt;br /&gt;
Public Const MK_LBUTTON = &amp;amp;H1&lt;br /&gt;
Public Const MK_RBUTTON = &amp;amp;H2&lt;br /&gt;
Public Const MK_MBUTTON = &amp;amp;H10&lt;br /&gt;
Public Const MK_SHIFT = &amp;amp;H4&lt;br /&gt;
Private Const GWL_WNDPROC = -4&lt;br /&gt;
Private Const WM_MOUSEWHEEL = &amp;amp;H20A&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Dim LocalHwnd As Long&lt;br /&gt;
Dim LocalPrevWndProc As Long&lt;br /&gt;
Dim MyForm As Form&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Private Sub Form_Activate()&lt;br /&gt;
WheelHook Me&lt;br /&gt;
End Sub&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Private Sub Form_Deactivate()&lt;br /&gt;
WheelUnHook&lt;br /&gt;
End Sub&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Private Function WindowProc(ByVal Lwnd As Long, ByVal Lmsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long&lt;br /&gt;
    Dim MouseKeys As Long, Rotation As Long, Xpos As Long, Ypos As Long&lt;br /&gt;
    &lt;br /&gt;
   If Lmsg = WM_MOUSEWHEEL Then&lt;br /&gt;
       MouseKeys = wParam And 65535&lt;br /&gt;
       Rotation = wParam / 65536&lt;br /&gt;
       Xpos = lParam And 65535&lt;br /&gt;
       Ypos = lParam / 65536&lt;br /&gt;
       MyForm.MouseWheel MouseKeys, Rotation, Xpos, Ypos&lt;br /&gt;
   End If&lt;br /&gt;
   WindowProc = CallWindowProc(LocalPrevWndProc, Lwnd, Lmsg, wParam, lParam)&lt;br /&gt;
End Function&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Public Sub WheelHook(PassedForm As Form)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;    On Error Resume Next&lt;br /&gt;
        Set MyForm = PassedForm&lt;br /&gt;
        LocalHwnd = PassedForm.hWnd&lt;br /&gt;
        LocalPrevWndProc = SetWindowLong(LocalHwnd, GWL_WNDPROC, AddressOf WindowProc)&lt;br /&gt;
End Sub&lt;/font&gt;&lt;/p&gt;
&lt;font face="Arial"&gt;
&lt;p&gt;&lt;br /&gt;
Public Sub WheelUnHook()&lt;br /&gt;
    Dim WorkFlag As Long&lt;/p&gt;
&lt;p&gt;    On Error Resume Next&lt;br /&gt;
        WorkFlag = SetWindowLong(LocalHwnd, GWL_WNDPROC, LocalPrevWndProc)&lt;br /&gt;
        Set MyForm = Nothing&lt;br /&gt;
End Sub&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
Public Sub MouseWheel(ByVal MouseKeys As Long, ByVal Rotation As Long, ByVal Xpos As Long, ByVal Ypos As Long)&lt;br /&gt;
    Dim NewValue As Long&lt;br /&gt;
    Dim ipToAdd As Integer&lt;br /&gt;
    On Error Resume Next&lt;/p&gt;
&lt;p&gt;    If Rotation &amp;gt; 0 Then&lt;br /&gt;
        ipToAdd = -3&lt;br /&gt;
    Else&lt;br /&gt;
        ipToAdd = 3&lt;br /&gt;
    End If&lt;br /&gt;
    &lt;br /&gt;
    If DATAGRID_Customers(0).Visible Then&lt;br /&gt;
        ADODC_CustbyName.RecordSet.Bookmark = adoCustbyName.RecordSet.Bookmark + ipToAdd&lt;br /&gt;
    ElseIf lstCustomers(1).Visible Then&lt;br /&gt;
        ADODC_CustbyCode.RecordSet.Bookmark = adoCustbyCode.RecordSet.Bookmark + ipToAdd&lt;br /&gt;
    End If&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;I know, i'm guilty of using my blog as a code repository so I don't forget stuff, more modern and interesting stuff will follow!&lt;/p&gt;
&lt;/font&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/114014.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2007/07/18/114014.aspx</guid>
            <pubDate>Wed, 18 Jul 2007 18:56:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/114014.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2007/07/18/114014.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/114014.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/114014.aspx</trackback:ping>
        </item>
        <item>
            <title>Windows Vista Service Hardening</title>
            <link>http://geekswithblogs.net/ntsmith/archive/2006/12/21/101783.aspx</link>
            <description>&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri&gt;Windows Services can no longer read mapped network drive letters, ie Directory.Exists(“H:\XMLDOCS”) will always return false even if you have H mapped.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The solution is to run the service under a user account with access to that share in Control Panel\Administrative Tools\Services.&amp;nbsp; Then in your code access the resource using its UNC name :-&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Calibri','sans-serif'; mso-ansi-language: EN-GB; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;Directory.Exists(“\\testsrvr01\xmldocs”).&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt; &lt;img src="http://geekswithblogs.net/ntsmith/aggbug/101783.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Neil Smith</dc:creator>
            <guid>http://geekswithblogs.net/ntsmith/archive/2006/12/21/101783.aspx</guid>
            <pubDate>Thu, 21 Dec 2006 20:26:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/ntsmith/comments/101783.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/ntsmith/archive/2006/12/21/101783.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/ntsmith/comments/commentRss/101783.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/ntsmith/services/trackbacks/101783.aspx</trackback:ping>
        </item>
    </channel>
</rss>
