Delphi tips and FAQs Delphi skill set Index
VCL:
#0002 how can I draw the rotated text on canvas?
How to Write rotated text on the canvas
#0005 to change a font style (bold nodes) in standard ttreeview component
Change the font style of the ttreeview Control
#0008 to disable a form Movement
Disable Form Movement
#0010 to add the horizontal scrollbar in ListBox
Add a horizontal scroll bar to ListBox
#0012 to set a checkbox without onclick event
Cancel the onclick event of the checkbox
#0013 to disable the on-fly tooltips in ttreeview
Disable tooltip on ttreeview
#0018 the form life cycle after creation
Form Lifecycle
#0023 to get a line/column number that a memo/richtext cursor is on
Obtains the number of rows or columns of the current cursor on memo or richtext.
#0025 to use a ComboBox instead inplace editor in tstringgrid
Use ComboBox to replace the default editor in tstringgrid
#0028 the offsets for tmemo
Tmemo Branch
#0029 the Quick filling a ListBox with file names
Use a file name to quickly fill in ListBox
#0034 to change alignment for tedit
Set tedit alignment
#0035 to make a form like System Modal
Set form to System Mode
#0036 to create a non-rectangular Control
Create irregular controls
#0038 how to add a flat/hot track effect to components
How to add hotkey tracking on controls
#0057 to delete the row in tstringgrid component
How to delete rows in tstringgrid.
#0065 to save/restore the component into blob-field
Use bolb-field to save and restore controls.
#0067 access to some item of tradiogroup component
Access the sub-item of tradiogroup
#0085 to save/load the glyphs to/from external file
How to access glyphs from external files
#0094 to assign a values to tstrings instead objects
Assign a value to tstring to replace the object.
#0102 to scroll a text in memo in run-time
Scroll memo text in real time
#0146 standard RichEdit component and URL highlighting
Highlight the URL in the RichEdit control
#0148 AutoComplete for edit/ComboBox
Enable Automatic completion in edit or ComboBox.
#0154 to exchange items in tlistview
Subitem of extended tlistview
#0158 to change a font for tlistview Header
Change the font of the tlistview column header
#0159 flat header for tlistview
Change the column header of tlistview to a flat style.
#0160 numeric editbox
How to allow only numbers in editbox
#0163 to print the ttreeview and tlistview
Print content in ttreeview or tlistview
#0164 to display week numbers in tdatetimepicker
Display the day of the week in tdatetimepicker
Databases Database
#0021 Database Programming Technology (design patterns)
Database Programming Technology (Use design mode)
#0043 to navigate by selected rows in DBGrid
In DBGrid, navigate through the selected row
#0062 to get the alias list, Tables List etc
Returns a list of aliases similar to a data table.
#0063 to copy (to dublicate) the dataset record
Copy dataset records
#0065 to save/restore the component into blob-field
Use bolb-field to save and restore controls.
#0079 to export a dataset into XML-File
Import database data into XML file
#0081 to check if BDE exists
Check whether BDE exists
#0091 to play a wav-file from memory or blob-field
Play wav files directly from memory or blob-field
#0092 to switch a DBGrid in edit mode and set a cursor in some position
At a specific location of DBGrid, set DBGrid to edit mode and set the current cursor
#0108 to generate the script for table Creation
Generate an SQL statement for creating a table
#0109 to generate the script for select-Statement
Select SQL statement generation
#0111 to create table in MS access with Dao
In MS Access, use DAO to create a table
#0141 to save file in blob and restore later
Use BLOB fields to access files
#0150 use tclientdataset as memory Dataset
Use tclientdataset as a memory Dataset
#0168 to execute the query in MS access
Execute query in MS Access
Reports, Printing
Print or report
#0017 printer settings-page sizes and margins (Part1)
Set the print size and margins
#0019 to get a printer settings (Part 2)
Get printer settings
#0020 to set a printer settings
Set printer settings
#0022 printing on the tprinter using default resident font (Part 1)
Print with the default tprinter font
#0026 the printer capabilities to print a graphics
Improve the printer's ability to print images
#0032 to change the default printer in Windows
Change the default printer for Windows
#0047 the list of jobs in the MS Windows Print Spooler
List all print jobs in the Windows Print Buffer
#0068 to use a resident font for printing (Part 2)
Print in default font
#0083 to print/preview the MS access's report
Print or preview reports with MS Access
#0087 to send a command strings to printer
Send command string to printer
#0090 to print a bitmap on printer
Print bitmap
Email, Internet, network
#0037 how to get your local IP?
How to obtain the local IP Address
#0041 PC is connected to a network
Determine whether a PC is connected to the Internet.
#0049 to create the e-mail message in MS Outlook
Send mail via MS Outlook
#0080 to download the file from Web
Download files from the Web
#0088 how do I find a MAC address?
Obtain the MAC address
#0095 to receive a modem list, which is installed in Win95/98
How to obtain the list of installed modem Windows 95/98
#0115 to create an email messaqe by mapi
Send mail via mapi
#0116 to download a file from Internet using sockets
Use SOCKET to download files from the Internet
#0117 to select a recipient from addressbook
Select recipient from address book
#0120 to retrieve a folder list from MS Outlook
Restore the file list from MS Outlook
#0121 to retrieve items (messages/tasks/etc) from any Outlok folder
Add and restore content from the outlook File
#0123 to retrieve and save the attachments from the MS Outlok message
Restore and save attachments to outlook emails
#0126 HTTP/URL Encoding
HTTP/URL Encoding
#0127 to print URL/html file using IE browser
Print URL/html files in IE browser
#0139 twebbrowser and POST request
Use twebbrowse to access webpages
#0161 to read the Proxy Information
Get Proxy Information
Windows API
#0001 how can I create a screenshot?
Get screenshots
#0004 how can I receive a list of processes running on a system?
How to obtain the Process List
#0006 delete a file into Recycle Bin
Delete an object to the recycle bin
#0007 to detect a Windows Version
Detect windows
#0009 to switch a keyboard layout
Convert keyboard layout
#0011 to add a some forms in Windows Task Manager
Add the child form to the taskbar.
#0014 to get a system icons
Retrieve system icons
#0016 turn monitor power ON/OFF
Turn on or off the display power
#0027 the current computer and user names
Get the current computer name and User Name
#0052 To Get A sizes of some system controls
Obtain the system control size.
#0053 to set the clock (system datetime) in Windows
Set Windows system clock
#0070 to read the environment string
Obtain the environment string
#0082 to read the current code page of System
Read the current code page of the system (obtain the operating system type)
#0084 to load the icons from external dll/EXE
Extract icons from DLL or EXE
#0086 to register the file Extention and context menu
Register the file extension and context menu
#0098 to retrieve a full path of module in DLL
Obtain the full path of the module in the DLL
#0105 to refresh a desktop
Refresh Desktop
#0106 to read a path of system folder
Obtain the system folder path
#0112 to press a mouse button from code
Click the mouse in the program
#0131 to use extended windows dialogs
Windows extension dialog box
#0133 to read native text of current locale
Obtain local text
#0138 to change a color of standard tprogressbar
Change the tprogressbar color
#0140 to define a custom icon for some folder
Icon of the custom folder
#0147 to show/hide clocks in tray
Display or hide the clock in the taskbar
#0151 to display a Property dialog for file, folder or drive
Dialog box showing properties of files, folders, and drives
#0156 alternative for topendialog/tsavedialog
Use APIs instead of topendialog/tsavedialog
#0157 select the folder Dialog
Select folder dialog box
#0166 to change the view style for opendialog/savedialog
Change the display style of opendialog/savedialog
#0167 to change the alignment for tbutton
Sets the alignment of tbutton.
#0170 to add the Chevron button for Toolbar
Add a Special icon in the toolbar
#0171 to add Chevron to ttoolbar if some buttons are invisible (Part 2)
Add a Special icon to the toolbar for a non-visual button
Menu
#0030 to add item into System Menu
Add a menu to the System Menu
#0033 to add bitmaps to menu items
Add a bitmap to the menu
#0060 to align a menu item to right
Right-aligned menu
#0155 to show the system menu
Show System Menu
Tools api
#0003 How can I check the Delphi/C ++ builder version?
How to check the versions of Delphi/C ++ Builder
#0040 to read/write a property by name
Read/write attributes by name
#0054 to get a name of Enum Value
Retrieve enumeration worthy names
#0069 to receive a names of all registered components
Get all registered component names
#0070 to receive a names of all palettes, which was registered in IDE
Obtain the names of all panels registered with IDE
#0073 to receive the list of published properties of component (Part 1)
Obtain the published attribute list of a component (method 1)
#0074 to receive the list of published properties of component (Part 2)
Obtain the published attribute list of a component (method 2)
#0103 to change a default font in IDE
Change the default ide font
#0104 to disable a new project Creation
Disable Automatic project creation when IDE is opened
#0119 to register a component editor which will be activated by right mouse click in Delphi ide
Right-click Delphi IDE and register the component editor.
Ole, com
#0049 to create the e-mail message in Outlook
Send emails with Outlook
#0051 to create a shell link/shortcut
Create shortcuts
#0083 print/preview the MS access's report
Print and preview access calls
#0086 to register the file Extention and context menu
Register the extension and menu
#0089 description of instancing and threading models in com-servers
Introduction to com server instances and thread Modes
#0120 to retrieve a folder list from MS Outlook
List outlook folders
#0128 to create an appointment in MS Outlook
Use outlook to create a specified
#0142 to read a sender address for mailitem (MS outlook)
Read the sender's address from Outlook mail
#0143 to check if OLE object is installed
Check whether the OLE object is installed
#0144 fast data transfer to MS Excel
Quickly write data to excel
#0145 contact list in MS Outlook
Obtain outlook contact information
#0149 language for installed MS Office
Obtain the language of the Office installation
#0152 Replace text/font in Doc-File
Replace text/font in DOC files
#0153 open the password-protected XLS-file and save Without Password
Open the password-protected xls file and save it as a password-free xls file.
You can change it to a brute-force password.
#0169 find the file name by Activex/Ole Class Name
File name discovery through ActiveX/Ole Class Name
Files, drives
#0031 to detect a drive type
Check drive type
#0046 to get a file datetime
Time when the file is obtained using fileage
#0050 how do I execute a program and have my code wait until it is finished?
Execute a program and wait for it to end
#0051 to create a shell link/shortcut
Create shortcuts
#0055 to get the serial number of a disk
Obtain the disk serial number
#0058 to accept the dropped files from Windows Explorer
Retrieve the drop-down file from the windows browser
#0066 the file in use or not
Check whether the file has been opened
#0075 to map the network disk
MAP network Disks
#0114 to load a file list by some wildcard
Use wildcards to obtain the file list
#0118 to recieve a number of files in some folder by wildcard
Obtain the number of files using wildcards
#0122 to change a creation date/time for file on disk
Modify the Disk File Creation Time
Algorithms Algorithm
#0039 to save/load a font information in INI/Text-File
Save and load fonts in ini or TXT files
#0048 CRC32 Calculation
CRC32 Algorithm
The writer supplys a method for building a CRC table and calculate the file CRC
#0056 to play with colors (dark/Light)
Set the brightness and darkness of the color
#0093 hash function for strings
String Hash Function
The writer finds a good hash function in Delphi sources (dbtable. Pas ).
#0113 correct round of number
Rounding
#0124 extended dayofweek Function
Extended day of week notation
#0125 second Wednesday of November
Calculate the date of the second Wednesday of January 1, November.
#0129 checksum by modulus 10
The modulo 10 checksum provides an algorithm description. It is not a simple modulo.
#0136 elf Hash Algorithm
Another Hash Algorithm
#0162 to extract the plain text from HTML string
Extract plain text from HTML text.
Conversions Conversion
#0042 to convert the bitmap to JPEG and vice versa
Conversion between bitmpa and JPEG
Use the tbitmap and Tsung Image
#0044 to convert a color string into HTML Format
Convert a color string to HTML Format
#0045 to convert color value into gray-scaled color value
Convert the color value to the gray value
#0132 to add leading zeros for numbers
Add the leading zero before the number
#0137 to create a disabled bitmap
Create a gray bitmap
#0165 to convert the file size to string (a-la Explorer)
Convert the file size to a string (in explorer mode)
Multimedia
#0015 to open/close a CD-drive
Optical Drive Switch
#0078 to sound a beep for some action
Play beep
#0091 to play a wav-file from memory or blob-field
Play a WAV file from the memory or blob-field
Miscellaneous
#0056 to play with colors (dark/Light)
Change the color of the dark light display
#0059 to draw in area of the Form Caption
Operation Form Caption
#0061 to retrieve the vertical refresh rate of the display
Restore the display's vertical refresh rate
#0064 to draw a chart on some canvas
Draw a chart on the canvas
#0072 to change a line type for drawing
Change the line type
#0076 to change button caption in open/savedialog
Use setdlgitemtext to modify the name of the open/savedailog button
#0077 to get a mouse position
Use getcursorpos to get the mouse position and control the position of the pop-up menu
#0094 to assign a values to tstrings instead objects
Use tstrings to store common types instead of Objects
#0096 to hide an application from taskbar
Use setwindowlong to hide the application in taskbar
#0097 to hide/show the start button from Windows taskbar
Hide the Start menu on the taskbar
#0107 to add a custom control in standard Dialog
Add custom controls in the standard dialog box
#0110 to increase a performance of standard ttreeview/tlistview
Improve ttreeview/tlistview Performance
#0130 to use a procedure in DLL from Delphi code
The process of calling DLL in Delphi
#0134 Daylight Saving Time
When reading the shard
#0135 to filter a mouse and keyboard
Filters mouse and keyboard events to help users wait for progress bars.