Delphi Miscellany

Action Lists (D4) Effectively Using Action Lists
http://community.borland.com/article/0,1410,27058,00.html 

Lights...Camera...Action!
www.raize.com/DelphiByDesign/DbD53.htm (Part 1)
www.raize.com/DelphiByDesign/DbD54.htm   (Part 2)

Taking Action - Using and Writing Actions and Action Lists
www.pbe.com/Kudzu/Articles/Actions/actions.html

See ActionList1 as part of MainForm in KeyTick PC Magazine utility by Neil Rubenking
(20 March 2001, add sounds to keyboard/mouse events)

Assembly Language Considerations for writing and using Intel assembly code in Delphi projects
www.optimalcode.com/Guido/tblcont.html 

BASM Code Examples
www.optimalcode.com/Guido/basm.html
 

cworn's UseNet Post with TGradient class and assembly code in the GetColorBetween function

Delphi Programming & Assembly Language (DIBULTRA)
http://perso.magic.fr/sleon/prog/DIBUltra/DIBUltraE.htm 

Low-Level Delphi:  Part II:  Inline Assembler and Stack Frames
www.delphizine.com/features/2000/03/di200003av_f/di200003av_f.asp 

Learning Assembler with Delphi
www.ftd.fr/od
ahan/docs/learnasm.zip
 

Netwide Assembler, a free portable assembler for the Intel 80x86 microprocessor series, which uses the traditional Intel instruction mnemonics and syntax.
www.web-sites.co.uk/nasm

NASM Meets Delphi:  Getting Started
NASM Meets Delphi:  Procedures, Functions and Parameters
http://free.prohosting.com/~whiskey7
 

Art of Assembly Language
http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html
www.creative.net.au/~adrian/mirrors/asm/artofasm.html

ASM Links
www.geocities.com/SiliconValley/2926/tp_1.html#ASM

Assembly Language Resources
http://cis.csuohio.edu/~somos/asmx86.html

Robert Lee's UseNet Post assembly code for changing "big endian" to "little endian":   Swap2, Swap4, Swap4Signed, SwapDoubleTo8, Swap8ToDouble

Martin Harvey's UseNet Post with WordSwap and DWordSwap

Paul Nicholls' UseNet Post about accessing a  pf16bit Scanline using BASM.
Robert Rossmair's UseNet Post about calculating the average color of a bitmap
Ken Florentino's example of using pf32bit bitmaps with assembly language.
Steve Agnew's E-Mail with Ebcdic2Ascii and Ascii2Ebcdic assembly routines.
Ernie Deel's UseNet Post with CountBits function (other variations were in newsgroup thread)
Sven Pran's UseNet Post to reverse bits in an integer

Azret's UseNet Post with assembly code for routines HasCPUID, CPUSignature, CPUType, CPUFamily, CPUModel, CPUStepping, CPUVendor

Thunking:  Calling 16-Bit Code From 32-Bit in Windows 95
www.itecuk.com/delmag/thunk95.htm

MASM is included in 98SETUP.EXE:
http://www.microsoft.com/ddk/ddk98.htm

Assembly Language, MMX

Eric Sibert's MMX avec Delphi 6 / Kylix (in French)
http://esibert.developpez.com/delphi/mmx/mmx.htm 

Eric Sibert's MMX (2) avec Delphi 6 et Kylix (in French)
http://esibert.developpez.com/delphi/mmx2/mmx2.htm 

Matthijs Laan's UseNet Post with MMX example to XOR bitmaps

MMXasm
www.yks.ne.jp/~hori/MMXasm-e.html 

Exentia is much easier to use than MMXasm:  Exentia is an open-source library for Delphi designed to perform computations on vectors of 32-bit floating point data elements using the Intel SSE, AMD 3D Now! and Intel x87 instruction sets.  www.tommesani.com/Exentia.html .  Dr. Chris Rorden created a  very basic project based on this software.  It uses QueryPerformanceCounter to measure the performance benefit for using SIMD calls.    http://www.psychology.nottingham.ac.uk/staff/cr1/simd.html

MMX Primer
www.tommesani.com/MMXPrimer.html 

MMX Enhanced Alpha Blending
www.gamedev.net/reference/articles/article817.asp 

Macros for MMX and conditional move instructions
http://agner.org/assem/#macros

TASM MMX Macros
http://www2.dgsys.com/~raymoon/faq/tasm.html#10

Alpha Blending (and MMX)
www.gamedev.net/reference/programming/features/mmxblend

MMX Technology Code Optimization
Dr. Dobb's Journal, Sept. 1999, pp. 38-48
www.ddj.com/articles/1999/9909/9909toc.htm
www.ddj.com/ftp/1999/1999_09/mmx.txt
www.ddj.com/ftp/1999/1999_09/mmx.zip

Assembly Language, Pentium

Assembly Resources:  How to optimize for the Pentium microprocessors
www.agner.org/assem

How to optimize for the Pentium microprocessors
http://agner.org/assem/#optimize

Pentium Optimizations and Numeric Performance
www.ddj.com/articles/1995/9501/9501a/9501a.htm?topic=scientific

Automation See
- separate MS Office Section for Office Automation
- OLE

Chapter 47, Creating an Automation Server
Borland's Delphi 5 Developer's Guide.

binh's COM notes
www.techvanguards.com/com/com.htm 

Introduction to Automation with Delphi
www.djpate.freeserve.co.uk/AutoIntro.htm

OLE Automation:  Controlling One Application With Another, Delphi Informant, Oct 1996

Automation in Delphi 3
www.raize.com/DelphiByDesign/DbD46.htm

Automating Adobe Photoshop
www.djpate.freeserve.co.uk/AutoPShp.htm

Automating Corel Draw
www.djpate.freeserve.co.uk/AutoCDrw.htm

BDE BDE Alternatives
www.kylecordes.com/bag/index.html
C / C++ Rudy's Delhi Corner

Using C object files in Delphi
Using C++ objects in Delphi

Coding Conventions Object Pascal Style Guide
www.egroups.com/files/Delphi-JEDI/API_Guidelines/StyleGuide.htm 

Delphi 4 Developer's Guide Coding Standards Document
www.econos.de/delphi/cs.html 

Code Complete gives a number of good ideas that can be applied to various computer languages:
  US  UK  DE  FR

Commnad-Line Tools "Command-Line Tools," Appendix A in Delphi in a Nutshell, pp. 473-488:
dcc32, brcc32, convert, tdump, delphi32
Compiler Directives Chapter 8 in Delphi in a Nutshell, pp. 435-472
Compiler Versions
Delphi 7, Kylix 3 VER150
Kylix 2 VER140
Delphi 6, Kylix 1 VER140
Delphi 5 VER130
C++ Builder 4 VER125
Delphi 4 VER120
C++ Builder 3 VER110
Delphi 3 VER100
C++ Builder 1 VER93
Delphi 2 VER90
Delphi 1 VER80
BP7 VER70
   
  WIN32
  CONSOLE
  MSWINDOWS
  LINUX
  WINE
  PUREPASCAL

Example:

{$IFDEF VER140}
...

{$ELSE}

...
{$ENDIF}

efg's UseNet Post about version conditionals in D7 and K3 including comment that these files were not in D6 release but are new with D7:

C:\Program Files\Borland\Delphi7\Source\Indy\IdCompilerDefines.inc
and
C:\Program Files\Borland\Delphi7\Source\IntraWeb\IWCompilerDefines.inc 

Lasse Vågsæther Karlsen's UseNet Post about "D5:   Version Conditional Compiler Directive"

Eldon Lewis comments in UseNet Post that: "You can always tell the version number by running dcc32.exe.  It will report the version number as 15.0, for example.  This tell you that you should use VER150."  Matthias Thoma responded Kylix 3 reports Version 14.5 but there is no VER145 defined.  Eldon's final answer was this:

{$IF CompilerVersion = 14.5}
  dkdkdk
{$IFEND}

Lasse Vågsæther Karlsen's Versions.INC (updated for D6 and Kylix) is quite useful for creating IFDEFs for version-sensitive code. 

Richard Fritz's UseNet Post has an interesting suggestion about how to create constants for various versions of Delphi, e.g., DELPHI123.

Compiler Versions and $IFDEFs:  Mark Hoffman's UseNet Post

Console Application

Charlie Calvert's ConBox unit in UseNet Post:   Console Application routines
Dmitriy Dubovskoy's UseNet Post about SetConsoleTextAttribute

Console Applications in Delphi
www.geocities.com/SiliconValley/Lakes/1636/con_apps.htm

Microsoft's About Character-Mode Support
http://msdn.microsoft.com/library/psdk/winbase/conchar_8gz8.htm 

Rick Betting's UseNet Post answering "How to get the output of a console application?"

Copyright U.S. Copyright Office
www.loc.gov/copyright
Decompilation www.csee.uq.edu.au/csm/decompilation
Delphi Utilities TScanUnits can be useful for parsing a ".pas", ".dpr" or ".dpk" source file to relate all declared units.   Includes sample project.   By Wellington Lima dos Santos.   TScanUnits.ZIP

The Really Useful Program for Setting Delphi Project Options
http://www.sci-clone.co.uk/Shareware 

DLLs Creating and Using DLLs (Chapter 19 in Teach Yourself Borland Delphi 4 in 21 Days)
www.kaposnet.hu/books/tysdelphi4/ch19/ch19.htm 

Delphi in a Nutshell Examples:  Font Name Wizard Trivial IDE extension that causes the TFont.Name property editor to display font names using the respective fonts. Demonstration of writing a DLL in Delphi.  www.tempest-sw.com/nutshell/examples.html 

Non-Delphi:
DLLGetVersion
http://msdn.microsoft.com/library/psdk/shellcc/shell/versions.htm#DllGetVersion 

Embedded Programming Embedded Pascal Page
http://users.iafrica.com/r/ra/rainier/index.htm
Free Pascal

Free Pascal Lazarus Project (Pascal for Linux)
www.miraclec.com/lazarus

GExperts -- Programming Power for Delphi www.gexperts.org 
History A Brief History of Pascal
www.oberon.ch/resources/component_pascal/history.html

UCSD p-System Museum
www.threedee.com/jcm/psystem

Borland Museum
http://community.borland.com/museum

Antique Software: Turbo Pascal version 5.5
http://community.borland.com/article/0,1410,20803,00.html 

Bob Swart's UseNet Post with D1-D6 release dates

Borland/Inprise Pascal Versions
www.emsps.com/oldtools/borpasv.htm 

Delphi -- 10 Years in the Making
pp. 4-7, Delphi Component Design by Danny Thorpe

Why the name "Delphi"? by Danny Thorpe
http://community.borland.com/article/0,1410,20396,00.html 

"A Little History"   D1 - D5
pp. 15-18, Delphi 5 Developer's Guide by Teixeria and Pacheco

Old, Used and Out-of-Print Borland/Inprise Software
www.emsps.com/oldtools/borland.htm 

IDE Hidden Features of the Delphi 5 IDE
http://community.borland.com/article/0,1410,20624,00.html
Internet, general Internet Programming with Delphi by Marco Cantù
http://community.borland.com/article/0,1410,27143,00.html 

Overbyte:  ICS - Internet Component Suite
http://www.overbyte.be

Introduction to Indy
www.pbe.com/Kudzu/Articles/IntroToIndy 

Streaming images from Web Applications
http://community.borland.com/article/0,1410,20378,00.html 

Web Broker Overview and Review
www.xapxone.com/html/dl304.htm 

IE & Delphi
www.euromind.com/iedelphi/index.html 

Internet, ASP Delphi and ASP:  Getting Started with Active Server Pages
www.delphizine.com/features/2000/07/di200007cj_f/di200007cj_f.asp 
Internet, Browser

IE & Delphi
www.euromind.com/iedelphi 

Internet, CGI Writing a Fancy CGI hit counter in Delphi 5
http://community.borland.com/article/0,1410,20201,00.html

CGI Expert Home Page
www.cgiexpert.com/cgiexpert_home.htm

Delphi CGI Programs
http://tothpaul.free.fr/uscgi.htm 

Simple CGI's in Delphi
www.undu.com/Articles/990315b.html

"A Database Chart on the Web," pp. 65-67, Chapter 22 (online "bonus" chapter) of  Mastering Delphi 5 by Marco Cantù.

Picture This on the Web:  A CGI Program to Deliver Database Pictures, Delphi Informant, Feb 1998

CGI-Win:  A practical approach to remote access database
www.cs.monash.edu.au/~vtran/cgiwin.htm

Bryan Valencia's "Choosing between CGI, WIN-CGI, and ISAPI"
www.209software.com/books/wpid

Internet, E-Mail Send an E-mail from Delphi
http://delphifaq.com/fq/q2058.shtml 

Internet Messaging Made Easy
www.delphizine.com/features/2000/10/di200010kr_f/di200010kr_f.asp 

How to send e-mail and faxes from your Delphi/C++ Builder application
www.bhnet.com.br/~simonet/howtoprojs.htm

Indy (formerly Winshoes)
http://www.nevrona.com/Indy/ 

Streaming images from Web Applications:  How to stream jpeg's, gif's, files, resource's, creating images on the fly, and setting MIME type information
http://community.borland.com/article/0,1410,20378,00.html 

Internet, SOAP Simple Object Access Protocol

Introduction to SOAP
www.agnisoft.com/soap/soapintro.htm 

Using SOAP with Delphi
www.msdelphi.com/Articles/SOAP/Using%20SOAP%20with%20Delphi.htm 

Pure SOAP
www.puresoftwaretech.com/puresoap 

Internet, WebBroker WebBroker Images
www.drbob42.com/delphi5/examin11.htm 
Interrupt List by Ralf Brown
www.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/WWW/files.html
Keystrokes, IDE Column block in D4:  Hold ALT key down while selecting a block

Rudy Velthuis' UseNet Post about keystrokes to insert the set of compiler directives into a source file:   Ctrl+O,O

Ctr+Shft+R - record (and stop recording) keystrokes
Ctrl+Shft+P - plays recorded keystrokes

Ctrl+E - starts incremental search

Ctrl+K+E - makes the current word completely lowercase
Ctrl+K+F - makes the current word complete uppercase
Ctrl+O+U - inverts case in selected portion

Ctrl+Alt+E - Euro

Bryan Valencia's UseNet Post with other IDE shortcuts

Copyright symbol:  Alt-0169

Shift-Ctrl-C
Add the Implementation framework for given method.
Example:  In the public section of a TForm1 definition, enter:

procedure WMSpoolerstatus( var msg: TWMSpoolerstatus );
message WM_SPOOLERSTATUS;

With the cursor somewhere in this area, enter Shift-Ctrl-C.  The following will be automatically added to the unit:

procedure TForm1.WMSpoolerstatus(var msg: TWMSpoolerstatus);
begin

end;

Keystrokes, Runtime Appendix D, Virtual Key Code Chart, Tomes Graphical, pp. 861-865

How to Simulate Visual Basic's SendKeys in Delphi
www.drdelphi.com/delphi/right/tips/sendkeys.htm

Sndkey32.pas is included on the Delphi installation CD (\Info\Extras\SndKey32.pas), makes it easy to simulate keyboard usage.  This unit includes two routines that simulate popular Visual Basic routines: Sendkeys and AppActivate. SendKeys takes a PChar as its first parameter and a boolean as its second, like so:

SendKeys('KeyString', Wait);

where KeyString is a string of key names and modifiers that you want to send to the current input focus and Wait is a boolean variable or value that indicates whether SendKeys should wait for each key message to be processed before proceeding. See the table below for more information.

AppActivate also takes a PChar as its only parameter, like so:

AppActivate('WindowName');

where WindowName is the name of the window that you want to make the current input focus.

SendKeys supports the Visual Basic SendKeys syntax.

Print Screen
Detecting if the PrintScreen key has been pressed, Borland FAQ 930D
Trapping the Windows system key "PrintScreen", Borland FAQ 1719D
Links about Printing and PrintScreen
Links about Capturing Bitmaps and PrintScreen

Disable PrintScreen with Ctrl + Alt combinations (WMHotKey, RegisterHotKey)
Morten Jacobsen's E-Mail with example

Peter Below's UseNet Post about how to disable the print screen key by defining it as a hotkey and then ignoring it.

How can I create a system wide keyboard hook under Win32?
http://delphifaq.com/fq/q2108.shtml 

How to scroll your form with pgUp and pgDn, TI 593D
Making accelerators work with a TPageControl, TI 315D
Making the Enter key work like a Tab in a TDBGrid, TI 737D
Making your own hotkeys, TI 587D
ShortCut Keys For Delphi, TI 4549D

How do I hide my application from the Alt_Tab menu?

Virtual Keys, Standard Set
Listed after line 17950 in Delphi 5 Windows.PAS [line 17751 in Delphi 4, line 11271 in Delphi 3]
Lists the virtual key values, TI 546D

Ralph Friedman's (Team B) UseNet Post about how to capture the ESC key

ESC key cancel.  If a button on a form has the Cancel property set to TRUE (which is set automatically for a TBitBtn with Kind = bkCancel and ModalResult = mrCancel), the OnClick handler is called when the ESC key is pressed.   If the ModalResult is other than mrNone, the form will also close after the OnClick is processed.

Intercepting Keystrokes
www.developers.demon.co.uk/intercept.html

Virtual Key Codes
www.drdelphi.com/delphi/right/tips/vkcodes.htm
www.erols.com/dparsons/right/tips/vkcodes.htm

How do I turn the Caps Lock or Num Lock keys on/off?
www.xploiter.com/programming/delphi/tips3.shtml#tip23

Disable alt-tab and ctrl+esc keys
www.xploiter.com/programming/delphi/tips3.shtml#tip22

PageUp/PageDown to Scroll Up/Down in TMemo in UseNet Post by Alexandru Preda

Slavisa Milojkovic's post to DelphiGames group about CM_DIALOGKEY message to trap the TAB key

Steve Koterski's UseNet Post on how to simulate a TAB
Bill Artemik's UseNet Post about "Enter as Tab"
Jason Wallace's UseNet Post "Simulating the Tab Key"
Ralph Friedman's UseNet Post "Trapping Tab/Shift Tab"
Peter Below's UseNet Post "Arrow keystroke with panels"
Peter Below's UseNet Post with PostKeyEx32 procedure to simulate key presses
Peter Below's UseNet Post with SetLockKey example of using GetAsyncKeyState
Peter Below's UseNet Post with SetLockKey example to set Caps Lock programmatically
Ian Davies' UseNet Post with SetLockKey example

Blocking CTRL+ALT+DEL in Windows 95:
// These routines are based on information from the Microsoft Knowledgebase
// article Q161133, "How to Block CTRL+ALT+DEL and ALT+TAB in Windows 95."
// Note: According to this documentation, the routines below will NOT work
// under Windows NT.

// Routine names adapted from suggestion by Geir Bratlie (royal@sn.no) in
// 12/8/96 post to comp.lang.pascal.delphi.misc, "Re: Help - Trapping KB
// Keys"

PROCEDURE TurnSystemKeysOff;
  VAR  dummy: INTEGER;
BEGIN
  SystemParametersInfo(SPI_SCREENSAVERRUNNING, INTEGER(TRUE), @Dummy, 0)
END {TurnSystemKeysOff};

PROCEDURE TurnSystemKeysOn;
  VAR  dummy: INTEGER;
BEGIN
  SystemParametersInfo(SPI_SCREENSAVERRUNNING, INTEGER(FALSE), @Dummy, 0)
END {TurnSystemKeysOn};

Let's Build a Compiler by Jack Crenshaw www.iecc.com/compilers/crenshaw
Microsoft Office:  Word, Excel, Access, Powerpoint Also see Automation Section above.

For Automation constants, see this directory:
C:\Program Files\Borland\Delphi5\Ocx\Servers 

Word Control:  Part I,  Microsoft Word as an Automation Server
www.delphizine.com/features/2000/09/di200009rg_f/di200009rg_f.asp 

Automating Word: Part II, Word Components in Delphi and Using OLE
www.delphizine.com/features/2000/10/di200010rg_f/di200010rg_f.asp 

Delphi in the Office:  Writing Office 2000 Add-ins in Delphi
http://www.delphizine.com/features/2000/05/di200005rl_f/di200005rl_f.asp 

In Chapter 16 of  Mastering Delphi 5 (pp. 746-750), Marco Cantù explains "Sending Data to Microsoft Word" and ""Building an Excel Table."

A PowerPoint example is in the Delphi directory under:
C:\Program Files\Borland\Delphi6\Demos\ActiveX\OleAuto\SrvComp\PowerPoint

Creating a Microsoft Excel Spreadsheet Viewer Using Delphi 5's ADOExpress
http://community.borland.com/article/1,1410,20066,00.html

Comments by Danny Thorpe (Inprise) in JEDI Digest 82 (21 Sept 99):
"Delphi 5 includes a set of component wrappers for most of the MS Office applications.  The component wrappers use early binding (interfaces) instead of late binding (variants).  For other automatable applications, Delphi 5's Import ActiveX will now generate component wrappers for non-visual controls and automation interfaces."

"Keep in mind that Microsoft makes no claim to compatibility of automation interfaces between versions of their Office applications.  The automation method names and parameters are different for each version of Word, for example, and even between different language versions of the same product (German,
French versions of Word 7).  It's really irritating."

Automation with Delphi
www.djpate.freeserve.co.uk/Automation.htm

Deborah Pate's UseNet Post about how to add formulas to an Excel spreadsheet

Delphi Word/Automation FAQ
www.softmosis.ca/WordFAQ.html

HowTo:  Automate Word 97 to Perform Mail Merge from Delphi
http://support.microsoft.com/support/kb/articles/q229/3/10.asp

Example of working with MS Excel 97 from Delphi
http://delphi.icm.edu.pl/ftp/d30free/excel97e.zip

Delphi 3 and Automation with Excel
http://vzone.virgin.net/graham.marshall/excel.htm

Delphi 3 and Automation with Word
http://vzone.virgin.net/graham.marshall/word.htm

How to Use Word 97 as a Report Engine
www.undu.com/Articles/990216a.html
www.undu.com/Articles/990502b.html (updated)

Peter Below's UseNet Post about how to close MS Word

Printing Reports Using Word
www.undu.com/Articles/990212b.html

XLS Read Write is two native Delphi components, TXLSRead and  TXLSWrite designed for accessing microsoft Excel XLS files.   There is no need for any other files to be installed, including Excel.  http://delphi.icm.edu.pl/ftp/d10free/axxlsrw.zip

Menno Avegaart's UseNet Post "How to create an Excel sheet directly"

procedure TFormExcelDemo.Button1Click(Sender: TObject);
  VAR
    Excel: variant;
    i : Integer;
begin
  TRY
    Excel := CreateOleObject('Excel.Application');
  EXCEPT
    ShowMessage('Cannot start Excel');
    exit;
  END;

  Excel.Workbooks.Add;
  FOR i := 1 TO 7 DO
    Excel.Cells[1, i].Value := i;

  Excel.Workbooks.Close;
end;

OLE OLE Drag and Drop Applications
www.unitoops.com/uoole/examples
Optimization High Performance Delphi
www.optimalcode.com 
Worked Examples
www.optimalcode.com/examples.htm 

Optimization Fundamentals
www.optimalcode.com/basics.htm 

Optimization Coding Guidelines
www.optimalcode.com/opguide.htm 

Delphi 32-bits Efficiency:  Performance Optimisation
www.drbob42.com/delphi/perform.htm

Optimizing Object Pascal in Delphi Developer

Programming Optimization
www.azillionmonkeys.com/qed/optimize.html

Steve Schafer's UseNet Post about WITH and optimization by version of Delphi

Michael Abrash's Graphics Programming Black Book:
Chapter 7, "Local Optimization,"
Chapter 21, "Unleashing the Pentium's V-pipe,"
Chapter 63, "Floating-Point for Real-Time 3D,"

Byte Alignment: Danny Thorpe in Delphi-JEDI Digest Number 74 (10 Sep 99):  Delphi 5's alignment padding now supports 8 byte alignment as well.   Data types 8 bytes  ... [or] ... larger will be aligned to 8 byte boundaries.

This is the source of the "mysterious" 6 to 10% performance improvement when code is recompiled with D5, even though the instruction sequences are pretty much the same as D4.

Profilers
ProDelphi inserts statements into the source code. At the start and the end of a procedure the actual number of used CPU-cycles is read. At the end of the procedure it is calculated, how many CPU-cycles have been used by the procedure itself and by all called procedures. ProDelphi works like a stopwatch.   www.prodelphi.de 
Registry How to programmatically make your programs run on Windows startup
www.chami.com/tips/delphi/112796D.html
Software Engineering "The Best Influences on Software Engineering," IEEE Software, Jan/Feb 2000
Programming Languages "Hall of Fame:"  Fortran, Cobol, Turbo Pascal, Visual Basic
www.computer.org/software/so2000/pdf/s1010.pdf

The Seven Habits of Highly Defective Developers
www.embedded.com/98/9807br.htm

SQL SQL Tips
www.209software.com/books/p4dp/SQLtips.html
System Information

Serguei's UseNet Post with routines GetServerDescription and GetUserDescription, 

"System Constants," Chapter 6 in Delphi in a Nutshell, pp. 422-427
"The SysUtils Unit," Appendix B in Delphi in a Nutshell, pp. 488-542

"Snooping System Information," Delphi 5 Developer's Guide, Chapter 14, pp. 483-541, by Teixeria and Pacheco

Getting a list of active processes, pp. 514-521, Delphi Programming Problem Solver.  Neil Rubenking's Tasks32 example is very good and shows results in a TListView.  See this shorter, D5 version of getting a list of processes.

Rainer Queck's UseNet Post about "How to get the computer details" in NT

Delphi and C++ Builder 4 component for access to physical memory  on Windows NT.   http://delphi.icm.edu.pl/ftp/d30share/memport.zip

Pradeep Prabhakar's UseNet Post about obtaining the number of CPUs using GetSystemInfo

Paul Toth's UseNet Post with TBIOS Record and interface for WOW32.DLL (in your Windows/System directory)

David Henningsson's UseNet Post with GetComputerName example

WinInfo. Returns following: MacAdress, BiosName, BiosVer,  BiosDate, Workgroup, ComputerName, Comment, ProductId,  ProductKey, SystemRoot, RegisteredOwner, RegisteredOrganization,  ProgramFilesDir, BootCount, CommonFilesDir, ConfigPath,   DevicePath, MediaPath, OtherDevicePath, PF_AccessoriesName,    ProgramFilesPath, SM_AccessoriesName, Version, VersionNumber,   WallPaperDir, ProductName, ProductType. 
http://delphi.icm.edu.pl/ftp/d20free/bbwininf.zip

Robert Lee's UseNet Post with GetProcessorSerialNumber
Luis Ortega's UseNet Post with assembly code for CPUID
Azret's UseNet Post with assembly code for CPUID in AzCPUId unit

Le Site Web de Michel: 
http://perso.wanadoo.fr/bardou/michel/delphi.htm#getversion.zip
http://perso.wanadoo.fr/bardou/michel/delphi.htm#sysexploitation.zip

NT Exception Unit, Process/Resource Viewer for NT,  Performance Data Viewer for NT, NT Service, NT Computer Access Rights.  www.wilsonc.demon.co.uk/delphi.htm

Tibetty's UseNet Post with function RegisterService

Alex V. Demin's UseNet Post explaining how to use GetVersion API call to detect the version of Windows

Displaying System Resources in Win 9x and NT 4 (TMemoryStatus), Borland TI 1582D

Interface for Microsoft Windows Performance Monitoring.  Project DELPHI Conversion Library by Marcel van Brakel.  ftp://delphi-jedi.org/api/PerfMon.zip 

Hardware SWAG (Software Archive Group):  60 examples
www.gdsoft.com/swag/hardware.zip    (requires Reader)

Non-Delphi:
www.sysinternals.com

Online Intel Documentation
www.x86.org/intel.doc/inteldocs.htm

Design a Windows NT Service to Exploit Special Operating System Facilities
www.microsoft.com/msj/1097/winnt.htm 

Windows Version Info using GetVersion Ex API call

 VAR
    OSVersionInfo:  TOSVersionInfo;
    OSPlatform   :  STRING;
. . .
  OSVersionInfo.dwOSVersionInfoSize := SizeOf(OSVersionInfo);
  GetVersionEx(OSVersionInfo);
  CASE OSVersionInfo.dwPlatformId of
    VER_PLATFORM_WIN32s	      :  OSplatform := 'Win32s under Windows 3.x';
    VER_PLATFORM_WIN32_WINDOWS:  OSplatform := 'Windows 95';
    VER_PLATFORM_WIN32_NT     :  OSplatform := 'Windows NT'
  END;
  Memo.Lines.Add(OSPlatform);
  Memo.Lines.Add('Major Version = ' + IntToStr(OSVersionInfo.dwMajorVersion));
  Memo.Lines.Add('Minor Version = ' + IntToStr(OSVersionInfo.dwMinorVersion));
  Memo.Lines.Add('Build Number  = ' + IntToStr(OSVersionInfo.dwBuildNumber));
  Memo.Lines.Add('Platform ID   = ' + IntToStr(OSVersionInfo.dwPlatformID));
  Memo.Lines.Add('CSDVersion    = ' + OSVersionInfo.szCSDVersion);
System Tips Delphi Informant's The Secret World of PIDLs -- Working with Windows' Shell Item Identifiers, Dec 1999

Shell Extensions in Delphi 3
www.raize.com/DelphiByDesign/DbD47.htm 

"Running Programs" (using RunFileDlg) in From the Shell:  Part I: Dialog Boxes You’ve Always Needed, Delphi Informant, April 1999

From the Shell:  Part II:  More Undocumented Shell Dialog Boxes

Writing Control Panel Applications in Delphi
www.optimalcode.com/Guido/cplapps.html 

Creating Control Panel Applets with Delphi in Delphi Developer, Nov 1998

Writing to the NT Event Log -- NT Event Management Made Easy
www.delphizine.com/features/1998/10/di199810th_f/di199810th_f.asp 

Using Delphi to call C functions with variable argument lists (using STDCALL calling convention)
www.inlink.com/~schutnik/kelly/delphi/cdecl.htm

Simulate MDI without Multiple Document Interface overhead
www.elementkjournals.com/ddj/9704/ddj9741.htm 

Shutdown in NT in Ray Adams' UseNet Post

A Resource Monitor for Delphi
www.drbob42.com/delphi/resmon.htm

TFindComputerDialog is a component wrapper for an undocumented Windows API function.
http://delphi.icm.edu.pl/ftp/d20free/finddlgs.zip

HeadConv - C Header Converter
How to Use C DLLs with Delphi
www.drbob42.com/delphi/headconv.htm

Control Panel Applets
http://www.delphizine.com/features/2000/01/di200001pr_f/di200001pr_f.asp 

Jeff Overcash's UseNet Post with IsWin98 function

Calling a Delphi DLL from your BCB Code
http://community.borland.com/article/0,1410,17596,00.html 

Zoralliln's UseNet Post showing use of GetEnvironmentVariable and WinExec

Lester Hanger UseNet Post about redirecting DOS output

"From the Shell:  Dialog Boxes You've Always Needed"
Examples:  Browsing for Folders, About Windows Dialog, Formatting Disks, Choosing Icons, Run Dialog Box
Delphi Informant, April 1999, Vol. 5, No. 4, pp. 8-22
File di9904kb.zip at www.informant.com/delphi/dfiles.asp
Examples:  Finding Files, Finding Computers, Browsing for Files, Displaying Object Properties, Networking, Shutting Down, Out of Memory
Delphi Informant, May 1999, Vol. 5, No. 5, pp. 28-36
File di9905kb.zip at www.informant.com/delphi/dfiles.asp

System Tips Blocking Multiple Copies of EXE from running
Place the following in the project (.DPR) file:

VAR
  MutexHandle:  THandle;

begin
  // Use Mutex to only allow one copy of XXXXX to be in memory at a time
  MutexHandle := 0;

  TRY
    MutexHandle := CreateMutex(NIL, TRUE, 'TFormXXXXX);
    IF   GetLastError = ERROR_ALREADY_EXISTS
    THEN BEGIN
      SetForegroundWindow(FindWindow('TFormXXXXX', NIL));
      CloseHandle (MutexHandle)
    END
    ELSE BEGIN
      Application.Title := 'XXXXX';
      Application.CreateForm(TFormXXXXX, FormXXXXX);
...
      Application.Run;
    END
  FINALLY
    ReleaseMutex(MutexHandle)
  END
end.

efg's UseNet Post with a method used by Neil Rubenking in one of his Delphi PC Magazine utilities

Threads

Chapter 8, Writing multi-threaded applications, Borland's Delphi 5 Developer's Guide.

Martin Harvey's Threads Tutorial:  Multithreading -- The Delphi Way
Chapter 1. What are threads? Why use them?
Chapter 2. Creating a thread in Delphi.
Chapter 3. Basic synchronization.
Chapter 4. Simple thread destruction.
Chapter 5. More thread destruction. Deadlock.
Chapter 6. More synchronization: Critical sections and mutexes.
Chapter 7. Mutex programming guidelines. Concurrency control.
Chapter 8. Delphi thread safe classes and Priorities.
Chapter 9. Semaphores. Data flow scheduling. The producer - consumer relationship.
Chapter 10. I/O and data flow: from blocking to asynchronous and back.
Chapter 11. Synchronizers and Events.
Chapter 12. More Win32 synchronization facilities.
Chapter 13. Using threads in conjunction with the BDE, Exceptions and DLLs.
Chapter 14. A real world problem, and its solution.

Children of Threadmare:  Sharing Progress with Users Intelligently
www.delphizine.com/features/2000/11/di200011ns_f/di200011ns_f.asp 

Waking from Threadmare:  An Agent-based Approach to Multi-threaded Programming
www.delphizine.com/features/2000/06/di200006ns_f/di200006ns_f.asp 

Delphi threading by example
http://community.borland.com/article/0,1410,22411,00.html 

Chapter 5, Concurrent Programming, in Delphi in a Nutshell, pp. 95-126 is an excellent starting point.  Topics covered there include:  Threads and Processes, Scheduling and States, Synchronizing Threads, Exceptions, Deadlock, TThread Class, BeginThread and EndThread functions.  Examples include a simple counter, background printing, creating a memory-mapped file, entering and leaving a mutex, TServerThread class. 

According to the Delphi Developer's Guide (D4) "Graphics objects are thread-save.  You do not need to use the main VCL thread to access TFont, TPen, TBitmap, TMetafile, or TIcon.  Canvas objects can be used outside the Synchronize method by locking them."

Using a background thread to compute and display a Mandelbrot set, Delphi in a Nutshell, pp. 148-151.

Request Threads:  One Solution to Resource-sharing Problems, Delphi Informant, Jan. 2000.

Thread-Safe DLLs, Delphi Informant, Nov 1998

In Chapter 17 of  Mastering Delphi 5 (pp. 788-811), Marco Cantù explains "Multithreading in Delphi."

Chapter 11, "Writing Multithreaded Applications," Delphi 5 Developer's Guide (pp. 275-335) by Teixeria and Pacheco

Threads Simplified:  Untangling a Gnarly Topic, Delphi Informant, Dec 1997.

Threads Demo
www.erols.com/dparsons/right/tips/thread.htm

A Thread-Safe Blocking Data Queue for Delphi
www.undu.com/Articles/990502e.html

Threads and Graphics and Response
Per Dalgas Jakobsen's UseNet Post

Thread based timer component from UseNet Post by Carl Caulkett

Better Threads for the VCL
www.midnightbeach.com/jon/pubs/MsgWaits/MsgWaits.html

ThreadedTimer.  Timer component with a 1 millisecond real resolution.
www.digiserve.com/cmab/download/thdtimer.zip
http://carlosbarbosa.westhost.com/delphi/thdtimer.php3

Thread Synchronization: Critical Sections
www.delumpa.com/tips/opascal/op4.htm

Christo Crause's UseNet Post about setting thread priority

Sergey Tkachenko's UseNet Post discussing REALTIME_PRIORITY_CLASS)

Mike Williams' UseNet Reply about Thread and CPU Usage (and Sleep/SleepEx)

Threads in Games
http://www-cs-students.stanford.edu/~amitp/Articles/Threads.html

User Interface / Human Factors (Non-Delphi)

Official Guidelines for User Interface Developers and Designers
http://msdn.microsoft.com/library/default.asp?URL=/library/books/winguide/welcome.htm 

Interface Hall of Shame
www.iarchitect.com/mshame.htm

Usability First:  Online guide to usability resources
www.usabilityfirst.com 

Making Medical Device Interfaces More User-Friendly.  Ten design tips to enhance user interfaces.
www.devicelink.com/mddi/archive/98/05/032.html 

Designing Medical Devices to Minimize Human Error
www.devicelink.com/mddi/archive/97/05/026.html 

FDA's Do It By Design:  An Introduction to Human Factors in Medical Devices
www.fda.gov/cdrh/humfac/doit.html 

The Magical Number Seven, Plus or Minus Two: Some Limits on Our Capacity for Processing Information.  www.well.com/user/smalin/miller.html 

Version Control Free VCS
www.freevcs.de
 
Windows 2000/NT No VCL after installation on "Administrator" and trying to use Delphi on another user?
Johannes Berg's UseNet Post with a Windows 2000 solution that worked for me
Windows 95/98 ARMiller's Windows 98 Web Sites
www.nmt.edu/~armiller/win98.htm

Windows 95 Annoyances
www.annoyances.org/win95

Windows 98 Annoyances
www.annoyances.org/win98

Undocumented Windows 95
www.geocities.com/SiliconValley/4942/functions.html 

Windows API

Windows API Tutorials (non-Delphi)
http://www.relisoft.com/win32/index.htm

Windows Versions API Calls:  GetVersion (obsolete) and GetVersionEx (new)

SysUtils:  Win32MajorVersion, Win32MinorVersion

XML XML Tutorial
www.software.ibm.com/developer/education/xmlintro/xmlintro.html

XML/XSL/Xlink Software Tools
http://xml.coverpages.org/xml.html#xmlSoftware 


Delphi Science Links

Bounce A fun graphic example that displays bouncing springs with gravity, friction, etc. by Ben Ziegler.
www.radix.net/~bziegler/Delphi/bounce.zip
Also requires Ben's library: www.radix.net/~bziegler/Delphi/benlib.zip
Bouncing Ball www.delphiforfun.org/Programs/bouncing_ball.htm 
CData Some fundamental chemistry related routines
www.lohninger.com/cdata.html
CForm Chemical formulas.
www.lohninger.com/cform.html
ChemTxt Collection of components to display chemical formulae and equations.
http://delphi.icm.edu.pl/ftp/d10free/chemtxt.zip
Chem Package for Delphi www.halyava.ru/urchemcalc/chempack.html
Collide A physics simulation of colliding spherical objects by Charles Hacker
www.gu.edu.au/school/eng/mmt/collide.zip 
Flames Winners of Borland's "Flame" contest
http://homepages.borland.com/ccalvert/Contest/FlameWinners.html

Directory containing February "Flame" contest entries
http://homepages.borland.com/ccalvert/Contest/

Heat Graphically demonstrates how heat dissipates by Ben Ziegler.
www.radix.net/~bziegler/Delphi/heat.zip
Lightning Nelson Chu Siu Hang's "Ideas Behind My Lightning Effect"
www.cs.ust.hk/~cpegnel/lightning.html
Molecules
A graphic demo program, showing molecules in 3D. It's a Delphi adaptation of a Java JDK1.0 demo applet.   This routine uses scanlines and imagelists.   Move selected molecules in 3D space by clicking and dragging on the image.  By Jean-Yves Quéinec.   MoleculesA.ZIP
Moon TMoon Component:  Shows phases of the moon.
www.hoerstemeier.com/delphi.htm#moon  

Simple component that shows the current phase of the Moon by Zeljko Pajkic.
http://delphi.icm.edu.pl/ftp/d30free/moon.zip

Draw the Moon
www.delphiforfun.org/Programs/Delphi_Techniques/Draw%20Moon.htm 

Radiation Decay www.gu.edu.au/school/eng/mmt/RadDec.html by Charles Hacker
Roller Coaster Simulation www.delphiforfun.com/Programs/roller_coaster.htm 
Scientific Grapher www.delphiforfun.org/Programs/Scientific%20Grapher.htm 
Solar System Simulation www.geocities.com/SiliconValley/Sector/7061/solsysim.zip
Sun Solar Position
www.delphiforfun.org/Programs/Solar_Position.htm 
TChem... Package of components for Delphi represents an attempt to     make enchanced visualization of chemical formulas stored as  usual strings without formatting information. Auto subscripts  and case correction. Includes base class TChemString with  painting methods and following visual components: TChemLabel,   TChemEdit, TChemComboBox, TChemListBox, TDBChemLabel,TDBChemEdit,   TDBChemComboBox, TDBChemListBox, TQRChemText, TQRDBChemText.    Freeware for non-commercial use.  http://delphi.icm.edu.pl/ftp/d40free/chem20d4.zip
TFire Draws a flame blazing.
http://delphi.icm.edu.pl/ftp/d30free/tfire3.zip
TFlame http://delphi.icm.edu.pl/ftp/d10free/flame.zip
X-Ray Generates the X-Ray spectrum from medical diagnostic equipment (by Charles Hacker)
www.gu.edu.au/school/eng/mmt/doseim.zip 
Windchill A windchill calculator:  www.delphiforfun.org/Programs/windchill.htm 
Waves A physics simulation of wave properties (by Charles Hacker)
www.gu.edu.au/school/eng/mmt/waves.zip 

Updated 14 Jun 2009
Since 7 Mar 1999