Welcome to the DelphiDabbler Delphi Tips micro-site.
There are over 200 Delphi Tips here. Choose them from the list below or use the search box.
- A general purpose Base64 decoding routine using Indy (#157)
- Add animation effects to your forms (#188)
- Adding component help to Delphi (#40)
- Animate tray application windows as they open and close (#48)
- Animate windows as they are opened and closed (#46)
- Auto-resizing and centring forms on screen (#67)
- BDE API Overview (#212)
- Boyer-Moore-Horspool text searching (#41)
- Calling CreateProcess() the easy way (#4)
- Change the button captions in a message dialog box (#173)
- Change the Delphi Object Inspector font size (#224)
- Change the font used in hints (#199)
- Check if an HTML element is displayed (#69)
- Check if computer is connected to the internet (#223)
- Check that a HTML document has completely loaded (#72)
- Communicate between processes using windows messaging (#51)
- Communicate with Windows Program Manager using DDE (#137)
- Convert between long and short file names (#6)
- Convert strings to character sets and vice versa (#234)
- Delete files with the ability to undo or recycle (#10)
- Delete or clear rows in a TStringGrid (#191)
- Detect if an application has stopped responding (#124)
- Different ways of executing applications and files from Delphi (#134)
- Dim the main application form when a dialog box is displayed (#228)
- Display the Browse for Folder dialog box (#63)
- Display the Windows Disconnect Network Drive dialog box (#175)
- Double quote a string that has spaces (#225)
- Draw a DBGrid with alternating row colours (#182)
- Drawing disabled text (#54)
- Drawing outlined text (#55)
- Drawing rotated text (#22)
- Encrypt and decrypt functions (#73)
- Ensure a form stays in the background (#189)
- Execute a DOS command and capture the output (#61)
- Execute a program and wait until it is done (#17)
- Extract keywords from an HTML document (#68)
- Fast string file searching (#42)
- File Open/Save Common Dialog Control IDs (#70)
- Find the position of the text cursor in a memo control (#125)
- Find the taskbar and system tray window handles (#47)
- Finding HTML elements by ID in a TWebBrowser document (#56)
- Force a TEdit to accept only numeric input (#151)
- Force display of a ToolButton's PopupMenu when the button is clicked (#197)
- Get the network computer and domain names (#62)
- Getting and setting the user and system environment variables (#64)
- How can I add my own custom menu item to another application? (#38)
- How to access the Registry using Windows API (#14)
- How to add a context menu item to Windows Explorer (#15)
- How to add an OnMouseDown event to a TPopupMenu (#117)
- How to add text completion capability to a TComboBox (#110)
- How to adjust RGB values using TTrackBars (#142)
- How to blend two pf24bit images using ScanLine (#147)
- How to block input to the system until released (#44)
- How to block pasting of text from the clipboard into an enabled TEdit (#207)
- How to calculate intersection points of lines or line sections with rectangles (#220)
- How to calculate the area of a polygon (#221)
- How to calculate the minimum distance between two polygons (#218)
- How to call CopyFileEx and let the callback update a progress bar (#160)
- How to call Internet Explorer from Delphi (#2)
- How to centre text in a TEdit (#85)
- How to centre text in a TEdit (alternative approach) (#159)
- How to change the corner size of RoundRect (#149)
- How to change the drag cursor image when dragging in a TTreeView (#119)
- How to check if a key is pressed (#45)
- How to check if a program is installed using its program identifier (#233)
- How to check if a string is a number (#27)
- How to check if a TTreeView is fully expanded or collapsed (#90)
- How to check if the BDE is installed (#28)
- How to compare two pf24bit images (#145)
- How to control the scroll buffer of a TMemo (#102)
- How to convert a *.bmp file to a *.jpg file (#97)
- How to convert an integer value to a Roman Numeral representation (#101)
- How to convert Delphi forms from binary to text and vice versa (#66)
- How to convert hex colour values into Delphi formatted ones (#140)
- How to convert TDateTime to a UNIX timestamp and vice versa (#30)
- How to copy data between TWebBrowsers (#13)
- How to copy multiple files into one (#165)
- How to create a borderless TComboBox (#84)
- How to create a brush using CreateBrushIndirect (#98)
- How to create a greyscale palette (#215)
- How to create a GUID (#214)
- How to create a non-rectangular TPanel (#94)
- How to create a pie chart (#148)
- How to create a resizable TPanel with a size grip (#92)
- How to create a TCheckBox with a transparent caption (#82)
- How to create a TComboBox with incremental search capabilities (#83)
- How to create a TDrawGrid where all cells act as buttons (#206)
- How to create a TEdit that accepts only numeric input (#86)
- How to create a TGroupBox with a checkbox that disables / enables all contained controls when checked (#112)
- How to create a TListBox that is resizable at runtime (#114)
- How to create a TListBox with Drag and Drop capabilities (#115)
- How to create a TMemo with alternating colours to paint the lines (#87)
- How to create a transparent TMemo (#209)
- How to create a transparent TPanel (#210)
- How to create a TScrollBar with a background bitmap (#120)
- How to create a TScrollBox with its own background (#121)
- How to create a TTreeView with a three state checkbox (#118)
- How to create a TTreeView without scrollbars (#91)
- How to create a virtual drive (#229)
- How to create components with a transparent background (#74)
- How to create data-aware components (#194)
- How to create gradient colour schemes (#139)
- How to create multiline hints (#34)
- How to create non-hiding hints (#33)
- How to define a minimum size for a component (#79)
- How to delete files with wildcards (#154)
- How to delete lines from a text file (#162)
- How to detach and re-attach an event (#123)
- How to detect and prevent Windows shut down (#185)
- How to detect text and font size changes (#31)
- How to determine the screen resolution (#20)
- How to determine the track of the current CD (#150)
- How to disable form movement using the mouse (#52)
- How to display icons in a combo box (#200)
- How to download a file using FTP (#176)
- How to draw dotted or dashed lines using a pen with a width greater than 1 (#143)
- How to draw on the Windows desktop (#198)
- How to empty a TImage (#23)
- How to enable scrollbars at design time (#78)
- How to expand a TMemo while keying in (#116)
- How to extract the title of an HTML document (#71)
- How to fade forms in and out (#179)
- How to find the minimum and maximum of three integers (#232)
- How to flash the taskbar (#11)
- How to generate a circle through three points (#144)
- How to generate a temporary file name (#164)
- How to get a screen shot of a control (#24)
- How to get and set the local computer name (#171)
- How to get data from a file without reading it into memory (#167)
- How to get rid of the BDE (#213)
- How to get the image size of a JPG, GIF and PNG image file (#201)
- How to get the physical caret position in a TMemo, TEdit or TRichEdit (#103)
- How to get the RGB value of a pixel under the mouse cursor (#95)
- How to get the size of a file (#50)
- How to get the size of a text file without opening it (#166)
- How to get the system's colour palette (#138)
- How to get the update region in a TGraphicControl (#196)
- How to handle a system time change (#227)
- How to have a form that never activates (#37)
- How to implement a 'Lasso' (#146)
- How to implement a custom component paint method that is dependent on outside data (#195)
- How to implement a multi-line caption on a TButton (#81)
- How to implement an OnAfterExecute event in a TActionList (#205)
- How to implement an OnMouseDown event for the buttons of a TRadioGroup (#122)
- How to implement autocompletion in a TEdit (#111)
- How to implement drag and drop at design time (#76)
- How to know if the mouse has entered the component area (#35)
- How to make a child form listen to broadcasted messages (#89)
- How to make a single instance of your application (#178)
- How to make a TCollectionItem contain a TCollection (#109)
- How to minimize the controls in a form (#174)
- How to mix or separate three color channels (#141)
- How to paint a translucent (not transparent) rectangle (#203)
- How to paint on a TControlCanvas in a TMemo (#208)
- How to paste files from Windows Explorer into your application (#161)
- How to perform a Shell Sort (#12)
- How to prevent a TListView from displaying tool tips for long items (#158)
- How to prevent a TWebBrowser from displaying a document's background (#58)
- How to print text and text files in Delphi (#32)
- How to programmatically make your programs run on Windows startup (#7)
- How to read bitmap file information (#19)
- How to read image pixels fast (#21)
- How to read the installed ADO version (#29)
- How to read Unicode text files (#168)
- How to read very large text files fast (#169)
- How to reduce the number of Set methods in a component (#108)
- How to refresh file icons (#18)
- How to register a global hotkey (#16)
- How to replace text in a Word document (#136)
- How to resize a *.jpg image and save the result to a file (#99)
- How to resize a TPanel at runtime (#93)
- How to resolve a host name (#25)
- How to retrieve all available TBrushStyle values as a list of strings (#222)
- How to retrieve rich text from a resource file and save it to disk (#153)
- How to retrieve the CPU vendor ID (#231)
- How to rotate a 2D point (#219)
- How to save 32 bit bitmaps in 24 bit bmp format (#202)
- How to save and load a TStringGrid to and from a file (#177)
- How to save and load printer settings to / from the registry (#104)
- How to save and restore font selections to a text file (#163)
- How to save several TBitmaps into one file (#100)
- How to save the canvas of a TPaintBox to a .bmp file (#152)
- How to save the font settings of a control to the registry (#192)
- How to search for a pattern in a file (#155)
- How to send a message to a specific control on a TForm (#105)
- How to send a simulated key press to the active control (#170)
- How to set boundaries for newly created controls (#77)
- How to snap a window to the screen edge (#36)
- How to subclass the default Delphi Dock Manager (#193)
- How to swap two integers without using a temporary variable (#180)
- How to tell Netscape Navigator which web pages to load from your Delphi program (#3)
- How to trap the ALT key state in a visual component (#80)
- How to turn numlock on by code (#26)
- How to use a function or a procedure as a parameter to another function (#129)
- How to use a scroll event in a TListBox (#113)
- How to use a TControlCanvas in a component (#75)
- How to use the alpha transparency features included in Windows 2000 and later (#96)
- How to wipe a file (#184)
- How to write a custom TAction to control the visibility of a TStatusBar (#204)
- How to write a list of strings to the registry (#88)
- Implementing a custom loop (#226)
- Incremental search of list box (#39)
- Inserting RTF code into a rich edit control (#57)
- Install components and IDE extensions into the Delphi IDE (#106)
- List of BDE error codes (#211)
- Making LMD buttons work when clicked (#65)
- Merging files (#60)
- Message box that works with a Delphi Service Application (#49)
- Move the mouse cursor from code (#1)
- Open documents and URLs in their associated applications (#5)
- Optimised replacements for DecodeDate and EncodeDate (#230)
- Prevent a Delphi form from being moved (#187)
- Prevent a Delphi form from being moved off screen (#183)
- Prevent flicker on graphics controls (#43)
- Prevent system sleep (#127)
- Print any type of document using Delphi (#131)
- Programatically log users off (#135)
- Reading and writing INI files (#59)
- Remove recently opened projects from the CodeGear RAD Studio IDE welcome page (#107)
- Right align main menu items (#128)
- Scanning MS Office documents using the MS Anti-virus API (#126)
- Search for help (#8)
- Serialize application settings (#133)
- Simulate the Visual Basic SendKeys and AppActivate routines in Delphi (#181)
- Solution for problem with auto update feature in Rad Studio 2010 and Win Vista/7 UAC (#156)
- Sort TStrings objects with extra functionality ala UNIX style parameters (#172)
- Take a screen shot of an inactive window (#186)
- Terminate a process instantly (#190)
- The purpose and use of DispInterface (#217)
- Triggering default menu items from code (#53)
- Using the TStrings.ValueFromIndex property (#130)
- What is a DispInterface? (#216)
- When was that file last accessed? (#9)
- Which COM objects to use? (#132)
Be warned that these tips are now quite old, few have ever been tested and those that have were tested on an old version of Delphi.
These tips are also available as a SQL database from the Delphi Tips GitHub Repository. Additional tips will also be found there in the extra
folder of that repository.
Any bugs in this site can be reported on the project's issues page. (GitHub account required).
Corrections of any errors in the tips are welcome: use the same issues page to submit them. If you notice an error but don't provide a fix the tip will simply have a note about the error attached to it – it will not be fixed!