Category Archives: Delphi

Delphi stuff to read but not gotten around to March 2013

http://podgoretsky.com/ftp/Docs/Delphi/D5/dg/packcomp.html http://webcache.googleusercontent.com/search?q=cache:0F0aoNui5HwJ:podgoretsky.com/ftp/Docs/Delphi/D5/dg/packcomp.html+&cd=1&hl=en&ct=clnk&gl=uk (Google Cache of Above) http://etutorials.org/Programming/mastering+delphi+7/Part+II+Delphi+Object-Oriented+Architectures/Chapter+10+Libraries+and+Packages/

Get application / file version information.

Selec All Code:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 function GetVersion2(const theFileName: string): string; var VerInfoSize: DWORD; VerInfo: Pointer; VerValueSize: DWORD; VerValue: PVSFixedFileInfo; Dummy: DWORD; begin Result := ”; VerInfoSize := GetFileVersionInfoSize(PChar(theFileName), Dummy); if VerInfoSize = 0 then Exit;… Read More »

Storing application data in Windows XP and higher

Selec All Code:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 uses ShlObj;   function GetSpecialFolder(const CSIDL: integer) : string; var RecPath : PWideChar; begin RecPath := StrAlloc(MAX_PATH); try FillChar(RecPath^, MAX_PATH, 0); if SHGetSpecialFolderPath(0, RecPath, CSIDL, false) then result := RecPath else result := ”; finally StrDispose(RecPath); end;… Read More »

Delphi Validating UK postcodes

http://www.daniweb.com/software-development/pascal-and-delphi/threads/276733/postcode-validation http://www.ml-consult.co.uk/foxst-39.htm Selec All Code:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 function ValidPostcode(anInput: String): Boolean; var iSpacePos, I: byte; sInward, sOutward: String; begin Result := False; if (anInput =… Read More »

How to Sort a ListView

Selec All Code:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 When you are working with a TListView component and want to sort the items based on a custom criteria, you can use the following idea…… Read More »

Delphi & Crystal Reports – Steves way

Choose Type Library “Crystal Report Control” (version 5.2 on my system) – CRYSTL32.OCX Gives me TCrystalReport If you get a complaint during compling saying it can’t find Crystal_TLB go to the PROJECT OPTIONS, click Delphi Compiler then add “E:\My Programs\Delphi2010\[packages]\TCrystalReport” to Search Path.

TListView info

This info is C orientated but you can figure it out! Start a new application with its default form From the Win32 tab of the Component Palette, double-click the ListView control. Change the Height of the ListView1 control to 200 and its Width to 350 Double-click an empty area on the form and implement the… Read More »