<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GSaraiva&#039;s Projects &#187; Usefull functions</title>
	<atom:link href="http://projects.pro.br/gsaraiva/tag/usefull-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://projects.pro.br/gsaraiva</link>
	<description>Step by step</description>
	<lastBuildDate>Tue, 01 Sep 2009 13:14:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Delphi: Utils :: TChainedList</title>
		<link>http://projects.pro.br/gsaraiva/2009/06/delphi-utils-tchainedlist/</link>
		<comments>http://projects.pro.br/gsaraiva/2009/06/delphi-utils-tchainedlist/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 13:54:08 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Chain List]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[TChainedList]]></category>
		<category><![CDATA[Usefull functions]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=417</guid>
		<description><![CDATA[Folks,
For everybody thats use a lot Chained lists on your projects:
uses SysUtils;&#160;type&#160;&#160;PPointer = ^Pointer;&#160;&#160;&#160;TChainedList = class&#160;&#160;private&#160;&#160;&#160;&#160;FFirst&#160;&#160; : Pointer;&#160;&#160;&#160;&#160;FLast&#160;&#160;&#160;&#160;: Pointer;&#160;&#160;&#160;&#160;FCurrent : Pointer;&#160;&#160;&#160;&#160;FCount&#160;&#160; : Integer;&#160;&#160;&#160;&#160;function GetCurrent: PPointer;&#160;&#160;public&#160;&#160;&#160;&#160;constructor Create;&#160;&#160;&#160;&#160;destructor Destroy; override;&#160;&#160;&#160;&#160;&#160;function First : TChainedList;&#160;&#160;&#160;&#160;function Last&#160;&#160;: TChainedList;&#160;&#160;&#160;&#160;function Prior : TChainedList;&#160;&#160;&#160;&#160;function Next&#160;&#160;: TChainedList;&#160;&#160;&#160;&#160;&#160;function Add: TChainedList;&#160;&#160;&#160;&#160;function Remove: TChainedList; overload;&#160;&#160;&#160;&#160;function Remove&#40;AChainedReleaser: Pointer&#41;: TChainedList; overload;&#160;&#160;&#160;&#160;&#160;property Current: PPointer read GetCurrent;&#160;&#160;&#160;&#160;property Count: Integer read FCount;&#160;&#160;end;&#160;implementation&#160;type&#160;&#160;PChainedItem [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>For everybody thats use a lot Chained lists on your projects:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">uses</span> SysUtils<span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;<span style="color: #000066; font-weight: bold;">PPointer</span> <span style="color: #000066;">=</span> <span style="color: #000066;">^</span>Pointer<span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;TChainedList <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">private</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FFirst&nbsp;&nbsp; <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FLast&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCount&nbsp;&nbsp; <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Integer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> GetCurrent<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">PPointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">public</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">constructor</span> Create<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">destructor</span> Destroy<span style="color: #000066;">;</span> <span style="color: #000000; font-weight: bold;">override</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> First <span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Last&nbsp;&nbsp;<span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Prior <span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Next&nbsp;&nbsp;<span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Add<span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Remove<span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span> <span style="color: #000000; font-weight: bold;">overload</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">function</span> Remove<span style="color: #000066;">&#40;</span>AChainedReleaser<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span> <span style="color: #000000; font-weight: bold;">overload</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">property</span> Current<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">PPointer</span> <span style="color: #000066;">read</span> GetCurrent<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">property</span> Count<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Integer</span> <span style="color: #000066;">read</span> FCount<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">implementation</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;PChainedItem <span style="color: #000066;">=</span> <span style="color: #000066;">^</span>TChainedItem<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;TChainedItem <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">record</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Prior<span style="color: #000066;">,</span> Next<span style="color: #000066;">:</span> PChainedItem<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Data<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #808080; font-style: italic;">{ TChainedList }</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">constructor</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;FCount <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;FFirst <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;FLast <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">destructor</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Destroy</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;First<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">while</span> Current &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">do</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Remove<span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">inherited</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">GetCurrent</span><span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">PPointer</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> FCurrent &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000066;">@</span>PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">First</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FFirst<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Last</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FLast<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Prior</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> FCurrent &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> FCurrent &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Add</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;pNew<span style="color: #000066;">:</span> PChainedItem<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">New</span><span style="color: #000066;">&#40;</span>pNew<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;pNew<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;pNew<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;pNew<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> FFirst <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FFirst <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pNew<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FLast <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pNew<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span> <span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;pNew<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> PChainedItem<span style="color: #000066;">&#40;</span>FLast<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;PChainedItem<span style="color: #000066;">&#40;</span>FLast<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pNew<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FLast <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pNew<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FLast<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>FCount<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Remove</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;pCur<span style="color: #000066;">:</span> PChainedItem<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;pCur <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FCurrent<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span> &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">raise</span> Exception<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'Current item memory leak detected.'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span> &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span> &lt;&gt; <span style="color: #000000; font-weight: bold;">nil</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> pCur <span style="color: #000066;">=</span> FFirst <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FFirst <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FFirst<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> pCur <span style="color: #000066;">=</span> FLast <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FLast <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Prior</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> FLast<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span> <span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;FCurrent <span style="color: #000066;">:</span><span style="color: #000066;">=</span> pCur<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Next</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">Self</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Dispose</span><span style="color: #000066;">&#40;</span>pCur<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Dec</span><span style="color: #000066;">&#40;</span>FCount<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> TChainedList<span style="color: #000066;">.</span><span style="color: #006600;">Remove</span><span style="color: #000066;">&#40;</span>AChainedReleaser<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> TChainedList<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;TRelease <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">procedure</span><span style="color: #000066;">&#40;</span>APointer<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;PdrRelease<span style="color: #000066;">:</span> TRelease<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">@</span>PdrRelease <span style="color: #000066;">:</span><span style="color: #000066;">=</span> AChainedReleaser<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;PdrRelease<span style="color: #000066;">&#40;</span>PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;PChainedItem<span style="color: #000066;">&#40;</span>FCurrent<span style="color: #000066;">&#41;</span><span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">Data</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Remove<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>See how to use it here: <a href="http://gsaraiva.projects.pro.br/?p=418">Delphi: Chained List</a></p>
<p>Hugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2009/06/delphi-utils-tchainedlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: ToolButtonScreenPos</title>
		<link>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-toolbuttonscreenpos/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-toolbuttonscreenpos/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 23:26:16 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[GetDCOrgEx]]></category>
		<category><![CDATA[ToolButtonScreenPos]]></category>
		<category><![CDATA[Usefull functions]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=341</guid>
		<description><![CDATA[Folks,
For everybody that needs the ToolButton position:
type&#160;&#160;TToolButtonAccess = class&#40;TToolButton&#41;;&#160;function ToolButtonScreenPos&#40;AToolButton: TToolButton&#41;: TPoint;begin&#160;&#160;GetDCOrgEx&#40;TToolButtonAccess&#40;AToolButton&#41;.Canvas.Handle, Result&#41;;&#160;&#160;Inc&#40;Result.X, AToolButton.Left&#41;;&#160;&#160;Inc&#40;Result.Y, AToolButton.Top&#41;;end;
Hugs!
]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>For everybody that needs the ToolButton position:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;TToolButtonAccess <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #000066;">&#40;</span>TToolButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> ToolButtonScreenPos<span style="color: #000066;">&#40;</span>AToolButton<span style="color: #000066;">:</span> TToolButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> TPoint<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;GetDCOrgEx<span style="color: #000066;">&#40;</span>TToolButtonAccess<span style="color: #000066;">&#40;</span>AToolButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">Canvas</span><span style="color: #000066;">.</span><span style="color: #006600;">Handle</span><span style="color: #000066;">,</span> Result<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">.</span><span style="color: #006600;">X</span><span style="color: #000066;">,</span> AToolButton<span style="color: #000066;">.</span><span style="color: #006600;">Left</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">.</span><span style="color: #006600;">Y</span><span style="color: #000066;">,</span> AToolButton<span style="color: #000066;">.</span><span style="color: #006600;">Top</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Hugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-toolbuttonscreenpos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: SpeedButtonScreenPos</title>
		<link>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-speedbuttonscreenpos/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-speedbuttonscreenpos/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 23:24:54 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[GetDCOrgEx]]></category>
		<category><![CDATA[SpeedButtonScreenPos]]></category>
		<category><![CDATA[Usefull functions]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=339</guid>
		<description><![CDATA[Folks,
For everybody that needs the Speedbutton position:
type&#160;&#160;TSpeedButtonAccess = class&#40;TSpeedButton&#41;;&#160;function SpeedButtonScreenPos&#40;ASpeedButton: TSpeedButton&#41;: TPoint;begin&#160;&#160;GetDCOrgEx&#40;TSpeedButtonAccess&#40;ASpeedButton&#41;.Canvas.Handle, Result&#41;;&#160;&#160;Inc&#40;Result.X, ASpeedButton.Left&#41;;&#160;&#160;Inc&#40;Result.Y, ASpeedButton.Top&#41;;end;
Hugs!
]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>For everybody that needs the Speedbutton position:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">type</span></li><li>&nbsp;&nbsp;TSpeedButtonAccess <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #000066;">&#40;</span>TSpeedButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;</li><li><span style="color: #000000; font-weight: bold;">function</span> SpeedButtonScreenPos<span style="color: #000066;">&#40;</span>ASpeedButton<span style="color: #000066;">:</span> TSpeedButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> TPoint<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;GetDCOrgEx<span style="color: #000066;">&#40;</span>TSpeedButtonAccess<span style="color: #000066;">&#40;</span>ASpeedButton<span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">Canvas</span><span style="color: #000066;">.</span><span style="color: #006600;">Handle</span><span style="color: #000066;">,</span> Result<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">.</span><span style="color: #006600;">X</span><span style="color: #000066;">,</span> ASpeedButton<span style="color: #000066;">.</span><span style="color: #006600;">Left</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">.</span><span style="color: #006600;">Y</span><span style="color: #000066;">,</span> ASpeedButton<span style="color: #000066;">.</span><span style="color: #006600;">Top</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Hugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-speedbuttonscreenpos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: DesktopArea</title>
		<link>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-desktoparea/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-desktoparea/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 23:12:43 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[DesktopArea]]></category>
		<category><![CDATA[FindWindow]]></category>
		<category><![CDATA[GetDesktopWindow]]></category>
		<category><![CDATA[GetWindowRect]]></category>
		<category><![CDATA[Shell_TrayWnd]]></category>
		<category><![CDATA[SubtractRect]]></category>
		<category><![CDATA[Usefull functions]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=334</guid>
		<description><![CDATA[Folks,
For everybody that need to show something only on the useful area of the desktop I wrote this function:
function DesktopClientArea: TRect;var&#160;&#160;rDesktop, rWinBar: TRect;begin&#160;&#160;Windows.GetWindowRect&#40;GetDesktopWindow, rDesktop&#41;;&#160;&#160;Windows.GetWindowRect&#40;FindWindow&#40;'Shell_TrayWnd', nil&#41;, rWinBar&#41;;&#160;&#160;SubtractRect&#40;Result, rDesktop, rWinBar&#41;;end;
Hugs!
]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>For everybody that need to show something only on the useful area of the desktop I wrote this function:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">function</span> DesktopClientArea<span style="color: #000066;">:</span> TRect<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;rDesktop<span style="color: #000066;">,</span> rWinBar<span style="color: #000066;">:</span> TRect<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;Windows<span style="color: #000066;">.</span><span style="color: #006600;">GetWindowRect</span><span style="color: #000066;">&#40;</span>GetDesktopWindow<span style="color: #000066;">,</span> rDesktop<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Windows<span style="color: #000066;">.</span><span style="color: #006600;">GetWindowRect</span><span style="color: #000066;">&#40;</span>FindWindow<span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'Shell_TrayWnd'</span><span style="color: #000066;">,</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">,</span> rWinBar<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;SubtractRect<span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">,</span> rDesktop<span style="color: #000066;">,</span> rWinBar<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Hugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/09/delphi-utils-desktoparea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi: Utils :: ChangeDropShadow</title>
		<link>http://projects.pro.br/gsaraiva/2008/07/delphi-utils-changedropshadow/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/07/delphi-utils-changedropshadow/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 14:21:38 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[ChangeDropShadow]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[ReadBinaryData]]></category>
		<category><![CDATA[SystemParametersInfo]]></category>
		<category><![CDATA[Usefull functions]]></category>
		<category><![CDATA[UserPreferencesMask]]></category>
		<category><![CDATA[WriteBinaryData]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=220</guid>
		<description><![CDATA[Folks,
With this procedure you can change the Drop Shadow effect provided by windows XP/Vista on all windows without need to reset the computer.
procedure ChangeDropShadow&#40;AActive: boolean&#41;;var&#160;&#160;Buff: Cardinal;&#160;&#160;Param: Pointer;&#160;&#160;DevMode: TDeviceMode;begin&#160;&#160;with TRegistry.Create do&#160;&#160;begin&#160;&#160;&#160;&#160;RootKey := HKEY_CURRENT_USER;&#160;&#160;&#160;&#160;if OpenKey&#40;'\Control Panel\Desktop\', false&#41; then&#160;&#160;&#160;&#160;begin&#160;&#160;&#160;&#160;&#160;&#160;ReadBinaryData&#40;'UserPreferencesMask', Buff, 4&#41;;&#160;&#160;&#160;&#160;&#160;&#160;if AActive then&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Buff := Buff or &#40;1 shl 18&#41;&#160;&#160;&#160;&#160;&#160;&#160;else&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Buff := Buff xor &#40;Buff and &#40;1 shl 18&#41;&#41;;&#160;&#160;&#160;&#160;&#160;&#160;WriteBinaryData&#40;'UserPreferencesMask', Buff, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>With this procedure you can change the Drop Shadow effect provided by windows XP/Vista on all windows without need to reset the computer.</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Delphi"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">procedure</span> ChangeDropShadow<span style="color: #000066;">&#40;</span>AActive<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">boolean</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">var</span></li><li>&nbsp;&nbsp;Buff<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Cardinal</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;Param<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Pointer</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;DevMode<span style="color: #000066;">:</span> TDeviceMode<span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">with</span> TRegistry<span style="color: #000066;">.</span><span style="color: #006600;">Create</span> <span style="color: #000000; font-weight: bold;">do</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;RootKey <span style="color: #000066;">:</span><span style="color: #000066;">=</span> HKEY_CURRENT_USER<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> OpenKey<span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'\Control Panel\Desktop\'</span><span style="color: #000066;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #000066;">&#41;</span> <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">begin</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReadBinaryData<span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'UserPreferencesMask'</span><span style="color: #000066;">,</span> Buff<span style="color: #000066;">,</span> 4<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> AActive <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Buff <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Buff <span style="color: #000000; font-weight: bold;">or</span> <span style="color: #000066;">&#40;</span>1 <span style="color: #000000; font-weight: bold;">shl</span> 18<span style="color: #000066;">&#41;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">else</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Buff <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Buff <span style="color: #000000; font-weight: bold;">xor</span> <span style="color: #000066;">&#40;</span>Buff <span style="color: #000000; font-weight: bold;">and</span> <span style="color: #000066;">&#40;</span>1 <span style="color: #000000; font-weight: bold;">shl</span> 18<span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WriteBinaryData<span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'UserPreferencesMask'</span><span style="color: #000066;">,</span> Buff<span style="color: #000066;">,</span> 4<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Param <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">nil</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">if</span> AActive <span style="color: #000000; font-weight: bold;">then</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Param <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000066;">@</span>AActive<span style="color: #000066;">;</span></li><li>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SystemParametersInfo<span style="color: #000066;">&#40;</span>SPI_SETDROPSHADOW<span style="color: #000066;">,</span> 0<span style="color: #000066;">,</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Param<span style="color: #000066;">,</span> SPIF_SENDWININICHANGE<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;Free<span style="color: #000066;">;</span></li><li>&nbsp;&nbsp;<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li><li><span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Hugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/07/delphi-utils-changedropshadow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
