<?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>Delphi Tutorial &#187; Delphi Tutorial</title>
	<atom:link href="http://delphitutorial.info/category/delphi-tutorial/feed" rel="self" type="application/rss+xml" />
	<link>http://delphitutorial.info</link>
	<description></description>
	<lastBuildDate>Sun, 19 Jul 2009 10:48:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Check If The BDE Is Installed</title>
		<link>http://delphitutorial.info/check-if-the-bde-is-installed.html</link>
		<comments>http://delphitutorial.info/check-if-the-bde-is-installed.html#comments</comments>
		<pubDate>Sun, 02 Sep 2007 10:39:11 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/check-if-the-bde-is-installed.html</guid>
		<description><![CDATA[You can use this tip to check if the Borland Database Engine (BDE) is installed.

function isbdepresent: boolean;
var
IdapiPath: array&#91;0..255&#93; of Char;
IdapiHandle: THandle;
begin
result := false;
GetProfileString&#40;&#8216;IDAPI&#8217;, &#8216;DLLPath&#8217;, &#8216;C:&#8217;, IdapiPath, 255&#41;;
{next lines isolates the first directory path from the IdapiPath in case
there are more}
if Pos&#40;&#8216;;&#8217;, StrPas&#40;IdapiPath&#41;&#41; &#60;&#62; 0 then
begin
StrPCopy&#40;IdapiPath, Copy&#40;StrPas&#40;IdapiPath&#41;, 1, Pred&#40;Pos&#40;&#8216;;&#8217;,
StrPas&#40;IdapiPath&#41;&#41;&#41;&#41;&#41;;
end;
IdapiHandle := LoadLibrary&#40;StrCat&#40;IdapiPath, &#8216;IDAPI01.DLL&#8217;&#41;&#41;;
if IdapiHandle &#60; HINSTANCE_ERROR then
result [...]]]></description>
			<content:encoded><![CDATA[<p>You can use this tip to check if the Borland Database Engine (BDE) is installed.</p>
<p><span id="more-137"></span></p>
<div class="ch_code_container" style="font-family: monospace;height:500px;"><span style="color: #000000; font-weight: bold;">function</span> isbdepresent: <span style="color: #993333;">boolean</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span><br />
IdapiPath: <span style="color: #000000; font-weight: bold;">array</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span>..<span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#93;</span> <span style="color: #000000; font-weight: bold;">of</span> <span style="color: #993333;">Char</span>;<br />
IdapiHandle: <span style="color: #993333;">THandle</span>;<br />
<span style="color: #000000; font-weight: bold;">begin</span><br />
result := <span style="color: #000000; font-weight: bold;">false</span>;<br />
GetProfileString<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#8216;IDAPI&#8217;</span>, <span style="color: #ff0000;">&#8216;DLLPath&#8217;</span>, <span style="color: #ff0000;">&#8216;C:&#8217;</span>, IdapiPath, <span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">{next lines isolates the first directory path from the IdapiPath in case<br />
there are more}</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000066;">Pos</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#8216;;&#8217;</span>, <span style="color: #000066;">StrPas</span><span style="color: #66cc66;">&#40;</span>IdapiPath<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> &lt;&gt; <span style="color: #cc66cc;">0</span> <span style="color: #000000; font-weight: bold;">then</span><br />
<span style="color: #000000; font-weight: bold;">begin</span><br />
<span style="color: #000066;">StrPCopy</span><span style="color: #66cc66;">&#40;</span>IdapiPath, <span style="color: #000066;">Copy</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">StrPas</span><span style="color: #66cc66;">&#40;</span>IdapiPath<span style="color: #66cc66;">&#41;</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #000066;">Pred</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066;">Pos</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#8216;;&#8217;</span>,<br />
<span style="color: #000066;">StrPas</span><span style="color: #66cc66;">&#40;</span>IdapiPath<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #000000; font-weight: bold;">end</span>;<br />
IdapiHandle := LoadLibrary<span style="color: #66cc66;">&#40;</span><span style="color: #000066;">StrCat</span><span style="color: #66cc66;">&#40;</span>IdapiPath, <span style="color: #ff0000;">&#8216;IDAPI01.DLL&#8217;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #000000; font-weight: bold;">if</span> IdapiHandle &lt; HINSTANCE_ERROR <span style="color: #000000; font-weight: bold;">then</span><br />
result := <span style="color: #000000; font-weight: bold;">false</span><br />
<span style="color: #808080; font-style: italic;">{IDAPI is not present on this system}</span><br />
<span style="color: #000000; font-weight: bold;">else</span><br />
<span style="color: #000000; font-weight: bold;">begin</span><br />
FreeLibrary<span style="color: #66cc66;">&#40;</span>IdapiHandle<span style="color: #66cc66;">&#41;</span>;<br />
result := <span style="color: #000000; font-weight: bold;">true</span>;<br />
<span style="color: #808080; font-style: italic;">{IDAPI is present on this system}</span><br />
<span style="color: #000000; font-weight: bold;">end</span>;<br />
<span style="color: #000000; font-weight: bold;">end</span>;</div>
<p>
&nbsp;
</p>
<p>
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/check-if-the-bde-is-installed.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create Rounded Form</title>
		<link>http://delphitutorial.info/how-to-create-rounded-form.html</link>
		<comments>http://delphitutorial.info/how-to-create-rounded-form.html#comments</comments>
		<pubDate>Wed, 07 Mar 2007 14:14:15 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[Forms]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/how-to-create-rounded-form.html</guid>
		<description><![CDATA[How to Create Rounded Form

procedure TForm1.FormCreate(Sender: TObject);
var
f : HRGN;
begin
Form1.Borderstyle := bsNone;
f := CreateRoundRectRgn(
0, // x-coordinate of the region&#8217;s upper-left corner
0, // y-coordinate of the region&#8217;s upper-left corner
clientwidth, // x-coordinate of the region&#8217;s lower-right corner
clientheight, // y-coordinate of the region&#8217;s lower-right corner
40, // height of ellipse for rounded corners
40); // width of ellipse for rounded corners
SetWindowRgn(Handle,f,True);
end;
Download: [...]]]></description>
			<content:encoded><![CDATA[<p>How to Create Rounded Form</p>
<p><span id="more-66"></span></p>
<p><font size="2" face="Courier New, Courier, mono"><strong>procedure </strong>TForm1.FormCreate(<strong>Sender</strong>: TObject);<br />
<strong>var</strong><br />
f : HRGN;<br />
<strong>begin</strong><br />
Form1.Borderstyle := bsNone;<br />
f := CreateRoundRectRgn(<br />
0, // x-coordinate of the region&#8217;s upper-left corner<br />
0, // y-coordinate of the region&#8217;s upper-left corner<br />
clientwidth, // x-coordinate of the region&#8217;s lower-right corner<br />
clientheight, // y-coordinate of the region&#8217;s lower-right corner<br />
40, // height of ellipse for rounded corners<br />
40); // width of ellipse for rounded corners<br />
SetWindowRgn(Handle,f,True);<br />
<strong>end</strong>;</p>
<p></font>Download: <a id="p65" href="http://delphitutorial.info/wp-content/uploads/2007/03/create-rounded-form.zip">Source Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/how-to-create-rounded-form.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Create a Gradient Filled Form</title>
		<link>http://delphitutorial.info/how-to-create-a-gradient-filled-form.html</link>
		<comments>http://delphitutorial.info/how-to-create-a-gradient-filled-form.html#comments</comments>
		<pubDate>Fri, 02 Mar 2007 13:57:06 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[Forms]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/how-to-create-a-gradient-filled-form.html</guid>
		<description><![CDATA[You can create a gradient filled form to make form that is more beautiful.
procedure TForm1.FormPaint(Sender: TObject);
var
Row, Ht: Word;
begin
Ht := (ClientHeight + 255) div 256;
for Row := 0 to 255 do
with Canvas do
begin
Brush.Color := RGB(Row, 100, 0);
FillRect(Rect(0, Row*Ht, ClientWidth, (Row+1) * Ht));
end;
end;
You can change the value of (Row, 100, 0) to suite your preferences.
Example:
(Row, 255, 0) [...]]]></description>
			<content:encoded><![CDATA[<p>You can create a gradient filled form to make form that is more beautiful.<span id="more-64"></span></p>
<p><font size="2" face="Courier New, Courier, mono"><strong>procedure </strong>TForm1.FormPaint(Sender: TObject);<br />
<strong>var</strong><br />
Row, Ht: Word;<br />
<strong>begin</strong><br />
Ht := (ClientHeight + 255) div 256;<br />
<strong>for </strong>Row := 0 to 255 <strong>do</strong><br />
<strong>with </strong>Canvas <strong>do</strong><br />
<strong>begin</strong><br />
Brush.Color := RGB(Row, 100, 0);<br />
FillRect(Rect(0, Row*Ht, ClientWidth, (Row+1) * Ht));<br />
<strong>end</strong>;<br />
<strong>end</strong>;</p>
<p></font>You can change the value of (Row, 100, 0) to suite your preferences.</p>
<p>Example:</p>
<p>(Row, 255, 0) or (Row, 100, 255)</p>
<p><strong>Download</strong>: <a id="p63" href="http://delphitutorial.info/wp-content/uploads/2007/03/create-a-gradient-filled-form.zip">Source Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/how-to-create-a-gradient-filled-form.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Volume Name</title>
		<link>http://delphitutorial.info/get-volume-name.html</link>
		<comments>http://delphitutorial.info/get-volume-name.html#comments</comments>
		<pubDate>Thu, 22 Feb 2007 06:53:02 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/get-volume-name.html</guid>
		<description><![CDATA[This function used to get volume name.

function VolumeName(DriveName: Char): string;
var
max, Flags: DWORD;
Buf: array [0..MAX_PATH] of Char;
begin
try
GetVolumeInformation(PChar(DriveName + &#8216;:\&#8217;), Buf, sizeof(Buf), nil, max, Flags, nil, 0);
Result := StrPas(buf);
except
result := &#8221;;
end;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Edit1.Text := VolumeName(&#8216;C&#8217;);
end;
Download: Source Code
]]></description>
			<content:encoded><![CDATA[<p>This function used to get volume name.<br />
<span id="more-56"></span></p>
<p><font size="2" face="Courier New, Courier, mono"><strong>function </strong>VolumeName(DriveName: Char): <strong>string</strong>;<br />
<strong>var</strong><br />
max, Flags: DWORD;<br />
Buf: array [0..MAX_PATH] of Char;<br />
<strong>begin</strong><br />
<strong>try</strong><br />
GetVolumeInformation(PChar(DriveName + &#8216;:\&#8217;), Buf, sizeof(Buf), nil, max, Flags, nil, 0);<br />
Result := StrPas(buf);<br />
<strong>except</strong><br />
result := &#8221;;<br />
<strong>end</strong>;<br />
<strong>end</strong>;</p>
<p><strong>procedure </strong>TForm1.BitBtn1Click(Sender: TObject);<br />
<strong>begin</strong><br />
Edit1.Text := VolumeName(&#8216;C&#8217;);<br />
<strong>end</strong>;</p>
<p></font><strong>Download</strong>: <a id="p55" href="http://delphitutorial.info/wp-content/uploads/2007/02/get-volume-name.zip">Source Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/get-volume-name.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get Start Menu Directory</title>
		<link>http://delphitutorial.info/get-start-menu-directory.html</link>
		<comments>http://delphitutorial.info/get-start-menu-directory.html#comments</comments>
		<pubDate>Thu, 22 Feb 2007 06:17:44 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/get-start-menu-directory.html</guid>
		<description><![CDATA[This function used to get start menu directory.

uses shlobj;
function GetStartMenu: String;
var
dir: PItemIDList;
startmenu : array[0..MAX_PATH] of Char;
begin
SHGetSpecialFolderLocation(Application.handle, CSIDL_STARTMENU, dir);
SHGetPathFromIDList(dir, startmenu);
result := strpas(startmenu);
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Edit1.Text := GetStartMenu;
end;
Download: Source Code
]]></description>
			<content:encoded><![CDATA[<p>This function used to get start menu directory.<br />
<span id="more-54"></span></p>
<p><font size="2" face="Courier New, Courier, mono"><strong>uses </strong>shlobj;</font></p>
<p><font size="2" face="Courier New, Courier, mono"><strong>function </strong>GetStartMenu: <strong>String</strong>;<br />
<strong>var</strong><br />
dir: PItemIDList;<br />
startmenu : <strong>array</strong>[0..MAX_PATH] <strong>of </strong>Char;<br />
<strong>begin</strong><br />
SHGetSpecialFolderLocation(Application.handle, CSIDL_STARTMENU, dir);<br />
SHGetPathFromIDList(dir, startmenu);<br />
result := strpas(startmenu);<br />
<strong>end</strong>;</font></p>
<p><font size="2" face="Courier New, Courier, mono"><strong>procedure </strong>TForm1.BitBtn1Click(Sender: TObject);<br />
<strong>begin</strong><br />
Edit1.Text := GetStartMenu;<br />
<strong>end</strong>;</font></p>
<p><strong>Download</strong>: <a title="Download Source Code - Get Start Menu Directory" rel="attachment" id="p53" href="http://delphitutorial.info/get-start-menu-directory.html/download-source-code-get-start-menu-directory/">Source Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/get-start-menu-directory.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Windows Temporary Folder</title>
		<link>http://delphitutorial.info/get-windows-temporary-folder.html</link>
		<comments>http://delphitutorial.info/get-windows-temporary-folder.html#comments</comments>
		<pubDate>Tue, 20 Feb 2007 07:02:38 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[Files]]></category>
		<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/get-windows-temporary-folder.html</guid>
		<description><![CDATA[If you need to get windows temporary folder for your application you need to follow this steps.

function GetTempDirectory: String;
var
TempDir: array[0..255] of Char;
begin
GetTempPath(255, @TempDir);
Result := StrPas(TempDir);
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
label1.Caption := gettempdirectory;
end;
  Download Source Code
]]></description>
			<content:encoded><![CDATA[<p>If you need to get windows temporary folder for your application you need to follow this steps.</p>
<p><span id="more-46"></span></p>
<p><font size="2" face="Courier New, Courier, mono"><strong>function </strong>GetTempDirectory: String;<br />
<strong>var</strong><br />
TempDir: array[0..255] of Char;<br />
<strong>begin</strong><br />
GetTempPath(255, @TempDir);<br />
Result := StrPas(TempDir);<br />
<strong>end</strong>;</p>
<p><strong>procedure </strong>TForm1.BitBtn1Click(Sender: TObject);<br />
<strong>begin</strong><br />
label1.Caption := gettempdirectory;<br />
<strong>end</strong>;<br />
</font>  <a title="Get Windows Temporary Folder" rel="attachment" id="p45" href="http://delphitutorial.info/get-windows-temporary-folder.html/get-windows-temporary-folder/">Download Source Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/get-windows-temporary-folder.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Empty Recycle Bin</title>
		<link>http://delphitutorial.info/empty-recycle-bin.html</link>
		<comments>http://delphitutorial.info/empty-recycle-bin.html#comments</comments>
		<pubDate>Tue, 20 Feb 2007 06:53:43 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/empty-recycle-bin.html</guid>
		<description><![CDATA[Procedure to empty recycle bin

Procedure EmptyRecycleBin ;
Const
SHERB_NOCONFIRMATION = $00000001 ;
SHERB_NOPROGRESSUI   = $00000002 ;
SHERB_NOSOUND        = $00000004 ;
Type
TSHEmptyRecycleBin = function (Wnd : HWND;
pszRootPath : PChar;
dwFlags : DWORD
) : HRESULT; stdcall ;
Var
SHEmptyRecycleBin : TSHEmptyRecycleBin;
LibHandle         : THandle;
Begin  { EmptyRecycleBin }
LibHandle := [...]]]></description>
			<content:encoded><![CDATA[<p>Procedure to empty recycle bin<br />
<span id="more-44"></span></p>
<p><font size="2" face="Courier New, Courier, mono"><strong>Procedure </strong>EmptyRecycleBin ;<br />
<strong>Const</strong><br />
SHERB_NOCONFIRMATION = $00000001 ;<br />
SHERB_NOPROGRESSUI   = $00000002 ;<br />
SHERB_NOSOUND        = $00000004 ;<br />
<strong>Type</strong><br />
TSHEmptyRecycleBin = function (Wnd : HWND;<br />
pszRootPath : PChar;<br />
dwFlags : DWORD<br />
) : HRESULT; stdcall ;<br />
<strong>Var</strong><br />
SHEmptyRecycleBin : TSHEmptyRecycleBin;<br />
LibHandle         : THandle;<br />
Begin  { EmptyRecycleBin }<br />
LibHandle := LoadLibrary(PChar(&#8216;Shell32.dll&#8217;)) ;<br />
<strong>if </strong>LibHandle <> 0 <strong>then</strong><br />
@SHEmptyRecycleBin := GetProcAddress(LibHandle, &#8216;SHEmptyRecycleBinA&#8217;)<br />
<strong>else</strong><br />
<strong>begin</strong><br />
MessageDlg(&#8216;Failed to load Shell32.dll.&#8217;, mtError, [mbOK], 0);<br />
<strong>Exit</strong>;<br />
<strong>end</strong>;</p>
<p><strong>if </strong>@SHEmptyRecycleBin <> nil <strong>then</strong><br />
SHEmptyRecycleBin(Application.Handle,<br />
nil,<br />
SHERB_NOCONFIRMATION or SHERB_NOPROGRESSUI or SHERB_NOSOUND);<br />
FreeLibrary(LibHandle);<br />
@SHEmptyRecycleBin := nil ;<br />
<strong>end</strong>;  { EmptyRecycleBin }</p>
<p></font></p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/empty-recycle-bin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show deleted records</title>
		<link>http://delphitutorial.info/show-deleted-records.html</link>
		<comments>http://delphitutorial.info/show-deleted-records.html#comments</comments>
		<pubDate>Sat, 17 Feb 2007 05:55:49 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/show-deleted-records.html</guid>
		<description><![CDATA[With this procedure we can show deleted record from paradox table.

procedure deletedrecords(Table: TTable; SioNo: Boolean);
begin   
Table.DisableControls;
try   
Check(DbiSetProp(hDBIObj(Table.Handle), curSOFTDELETEON,
LongInt(SioNo)));
finally  
Table.EnableControls;
end;  
Table.Refresh;
end; 
]]></description>
			<content:encoded><![CDATA[<p>With this procedure we can show deleted record from paradox table.<br />
<span id="more-42"></span></p>
<p><font face="Courier New, Courier, mono"><font size="2"><strong>procedure </strong>deletedrecords(Table: TTable; SioNo: Boolean);<br />
<strong>begin   </strong><br />
Table.DisableControls;<br />
<strong>try   </strong><br />
Check(DbiSetProp(hDBIObj(Table.Handle), curSOFTDELETEON,<br />
LongInt(SioNo)));<br />
<strong>finally  </strong><br />
Table.EnableControls;<br />
<strong>end;  </strong><br />
Table.Refresh;<br />
<strong>end</strong>; </font></font></p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/show-deleted-records.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hide the titlebar</title>
		<link>http://delphitutorial.info/hide-the-titlebar.html</link>
		<comments>http://delphitutorial.info/hide-the-titlebar.html#comments</comments>
		<pubDate>Fri, 16 Feb 2007 06:45:32 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[Forms]]></category>
		<category><![CDATA[Windows API]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/hide-the-titlebar.html</guid>
		<description><![CDATA[Hide the titlebar.

Procedure TForm1.HideTitlebar;
var
Save : LongInt;
Begin
If  BorderStyle=bsNone then Exit;
Save:=GetWindowLong(Handle,gwl_Style);
If  (Save and ws_Caption)=ws_Caption then Begin
Case BorderStyle of
bsSingle,
bsSizeable : SetWindowLong(Handle,gwl_Style,Save and
(Not(ws_Caption)) or ws_border);
bsDialog :  SetWindowLong(Handle,gwl_Style,Save and
(Not(ws_Caption)) or  ds_modalframe or ws_dlgframe);
End;
Height:=Height-getSystemMetrics(sm_cyCaption);
Refresh;
End;
end;
And here is how we show it again:
Procedure TForm1.ShowTitlebar;
Var
Save : LongInt;
begin
If  BorderStyle=bsNone then Exit;
Save:=GetWindowLong(Handle,gwl_Style);
If  (Save and ws_Caption)ws_Caption then Begin
Case BorderStyle  of
bsSingle,
bsSizeable [...]]]></description>
			<content:encoded><![CDATA[<p>Hide the titlebar.<br />
<span id="more-43"></span></p>
<p><font size="2" face="Courier New, Courier, mono"><strong>Procedure </strong>TForm1.HideTitlebar;<br />
<strong>var</strong><br />
Save : LongInt;<br />
<strong>Begin</strong><br />
If  BorderStyle=bsNone then Exit;<br />
Save:=GetWindowLong(Handle,gwl_Style);<br />
If  (Save and ws_Caption)=ws_Caption then Begin<br />
<strong>Case </strong>BorderStyle <strong>of</strong><br />
bsSingle,<br />
bsSizeable : SetWindowLong(Handle,gwl_Style,Save and<br />
(Not(ws_Caption)) or ws_border);<br />
bsDialog :  SetWindowLong(Handle,gwl_Style,Save and<br />
(Not(ws_Caption)) or  ds_modalframe or ws_dlgframe);<br />
<strong>End</strong>;<br />
Height:=Height-getSystemMetrics(sm_cyCaption);<br />
Refresh;<br />
<strong>End</strong>;<br />
<strong>end</strong>;<br />
</font>And here is how we show it again:<br />
<font size="2" face="Courier New, Courier, mono"><strong>Procedure </strong>TForm1.ShowTitlebar;<br />
<strong>Var</strong><br />
Save : LongInt;<br />
<strong>begin</strong><br />
If  BorderStyle=bsNone then Exit;<br />
Save:=GetWindowLong(Handle,gwl_Style);<br />
If  (Save and ws_Caption)<>ws_Caption then <strong>Begin</strong><br />
<strong>Case </strong>BorderStyle  <strong>of</strong><br />
bsSingle,<br />
bsSizeable : SetWindowLong(Handle,gwl_Style,Save or<br />
ws_Caption or ws_border);<br />
bsDialog :  SetWindowLong(Handle,gwl_Style,Save or<br />
ws_Caption or ds_modalframe or  ws_dlgframe);<br />
<strong>End</strong>;<br />
Height:=Height+getSystemMetrics(sm_cyCaption);<br />
Refresh;<br />
<strong>End</strong>;<br />
<strong>end</strong>;<br />
</font></p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/hide-the-titlebar.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Check If a Directory Exists</title>
		<link>http://delphitutorial.info/check-if-a-directory-exists.html</link>
		<comments>http://delphitutorial.info/check-if-a-directory-exists.html#comments</comments>
		<pubDate>Thu, 15 Feb 2007 11:47:30 +0000</pubDate>
		<dc:creator>Delphi Tutorial</dc:creator>
				<category><![CDATA[Files]]></category>

		<guid isPermaLink="false">http://delphitutorial.info/check-if-a-directory-exists.html</guid>
		<description><![CDATA[How to check if a directory exists?

procedure TForm1.Button1Click(Sender:TObject);
beginÂ   
ifÂ DirectoryExists(&#8216;C:\Data&#8217;)Â then
beginÂ   
ShowMessage(&#8216;Directory already exists&#8217;);
end;
end;

]]></description>
			<content:encoded><![CDATA[<p>How to check if a directory exists?<br />
<span id="more-39"></span></p>
<p><strong><font face="Courier New, Courier, mono"><font size="2">procedure </font></font></strong><font face="Courier New, Courier, mono"><font size="2">TForm1.Button1Click(Sender:TObject);<br />
<strong>beginÂ   </strong><br />
ifÂ DirectoryExists(&#8216;C:\Data&#8217;)Â then<br />
<strong>beginÂ   </strong><br />
ShowMessage(&#8216;Directory already exists&#8217;);<br />
<strong>end</strong>;<br />
<strong>end</strong>;<br />
</font></font></p>
]]></content:encoded>
			<wfw:commentRss>http://delphitutorial.info/check-if-a-directory-exists.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.367 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-09 23:33:43 -->
