<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.6.1" -->
<rss version="0.92">
<channel>
	<title>DelphiTips.net</title>
	<link>http://www.delphitips.net</link>
	<description>...free Delphi tips &#38; source code repository</description>
	<lastBuildDate>Mon, 29 Sep 2008 18:23:07 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Get Process Memory Info</title>
		<description><![CDATA[If you want to know how many bytes of memory is using your process, here is simple example.
We will need standard psAPI unit. Using API function GetProcessMemoryInfo, we can get amount of used bytes of memory.

unit Unit1;
&#160;
interface
&#160;
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, psAPI;
&#160;
type
  TForm1 = class&#40;TForm&#41;
  [...]]]></description>
		<link>http://www.delphitips.net/2008/09/29/get-process-memory-info/</link>
			</item>
	<item>
		<title>Change font, size and style of hint</title>
		<description><![CDATA[Hints are everywhere. Almost every GUI element in Windows can be &#8220;hinted&#8221;. When user hover mouse over element, small yellow bubble with help text pops up. Is it possible to change hint &#8220;window&#8221; behavior? Of course&#8230;
To see how to change default color and timeouts of hint bubble, visit this post. To change font, size and [...]]]></description>
		<link>http://www.delphitips.net/2008/07/29/change-hint-font-and-style/</link>
			</item>
	<item>
		<title>Change color of ListView items</title>
		<description><![CDATA[To change background color of ListView items, you need to write your own OnCustomDrawItem event handler.
The best result is when you set the ViewStyle to vsReport, but it&#8217;s completely functional even with vsList style. OnCustomDrawItem code is very simple:

unit Unit1;
&#160;
interface
&#160;
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls;
&#160;
type
  TForm1 = [...]]]></description>
		<link>http://www.delphitips.net/2008/07/06/change-color-of-listview-cells/</link>
			</item>
	<item>
		<title>Listbox with colored lines</title>
		<description><![CDATA[Colored lines in listbox are more user-friendly and easy to read. Here is how to do it&#8230;
First of all, place ListBox component on a form and set Style property to lbOwnerDrawFixed. The rest is simple:

unit Unit1;
&#160;
interface
&#160;
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, StdCtrls;
&#160;
type
  TForm1 = class&#40;TForm&#41;
   [...]]]></description>
		<link>http://www.delphitips.net/2008/06/30/listbox-with-colored-lines/</link>
			</item>
	<item>
		<title>Get a unique name for temporary file</title>
		<description><![CDATA[Using GetTempFileName, we can create a unique name for temporary file. It&#8217;s useful when your application is using temporary files and you want to save them into default TEMP folder and use a &#8220;random&#8221; filename.

function GetTempFile&#40;const Extension: string&#41;: string;
var Buffer: array&#91;0..MAX_PATH&#93; OF Char;
    aFile : string;
begin
  repeat
    GetTempPath&#40;Sizeof&#40;Buffer&#41;-1, [...]]]></description>
		<link>http://www.delphitips.net/2008/05/27/get-a-unique-name-for-temporary-file/</link>
			</item>
	<item>
		<title>How to detect application associated with file</title>
		<description><![CDATA[To get full path to application associated with any file type, we need standard ShellAPI unit and the rest will do the FindExecutable function.
This function retrieves the name of and handle to the executable (.exe) file associated with a specific document file. For more information, visit detailed description on MSDN.

unit Unit1;
&#160;
interface
&#160;
uses
  Windows, Messages, SysUtils, [...]]]></description>
		<link>http://www.delphitips.net/2008/05/25/how-to-detect-application-associated-with-file/</link>
			</item>
	<item>
		<title>Searching for string within a file</title>
		<description><![CDATA[To search for a specific substring within any type of file, we can use this rather complex function.
As a parameter, just pass the filename, substring you want to search and finally set true or false, if you want to search case sensitive.

function ScanFile&#40;const filename: string; const forString: string; caseSensitive: Boolean &#41;: LongInt;
const BufferSize= $8001;
var
  [...]]]></description>
		<link>http://www.delphitips.net/2008/05/15/searching-for-string-within-a-file/</link>
			</item>
	<item>
		<title>How to minimize application with modal window</title>
		<description><![CDATA[When you minimize modal window, this window is &#8220;hidden&#8221; behind (or below) application main form. Using this simple trick, we can minimize also the main application window together with modal &#8220;child&#8221; window.

.
.
.
private
procedure WMSyscommand&#40;var Msg: TWmSysCommand&#41;; message WM_SYSCOMMAND;
&#160;
.
.
.
procedure TForm1.WMSysCommand&#40;var Msg: TWmSysCommand&#41;;
begin
  case &#40;Msg.CmdType and $FFF0&#41; of
    SC_MINIMIZE:  begin
    [...]]]></description>
		<link>http://www.delphitips.net/2008/05/07/how-to-minimize-application-with-modal-window/</link>
			</item>
	<item>
		<title>Detecting Windows boot-up state using GetSystemMetrics function</title>
		<description><![CDATA[Using GetSystemMetrics function, we can detect how the system is started.

function WindowsStartUpState: string;
begin
  case &#40;GetSystemMetrics&#40;SM_CLEANBOOT&#41;&#41; of
    0: Result := 'Normal boot';
    1: Result := 'Fail-safe boot';
    2: Result := 'Fail-safe with network boot';
  else
    Result := 'Unknown state';
  end;
end;

]]></description>
		<link>http://www.delphitips.net/2008/04/25/detecting-windows-boot-up-state-using-getsystemmetrics-function/</link>
			</item>
	<item>
		<title>Get user name of currently logged in user</title>
		<description><![CDATA[This simple function will return name of currently logged in user.

function UserName: String;
var User: PChar;
    i: DWord;
begin
  i := 1024;
  user := StrAlloc&#40;Succ&#40;i&#41;&#41;;
  if GetUserName&#40;User, i&#41; then Result := StrPas&#40;User&#41;
                    [...]]]></description>
		<link>http://www.delphitips.net/2008/04/24/get-user-name-of-currently-logged-in-user/</link>
			</item>
</channel>
</rss>
