Category Archives: Builder

Base64 Encode and Decode – VCL

Here is a way to Base64 Encode and Decode your string in Borland C++ Builder (VCL)… Read more »

Get User IP address

So, you need a way to get your user local IP address? Here is the winsock way. Read more »

Reporting formatted errors

So, you want to report errors in a printf / sprintf way? Check this out… Read more »

Finding files…

Read more »

File version information

Q: How can I get file version information from my own exe/dll or any other file?
A: The VerQueryValue function retrieves specified version information from the specified version-information resource. To retrieve the appropriate resource, before you call VerQueryValue, you must first call the GetFileVersionInfoSize function, and then the GetFileVersionInfo function.
Read more »

BPX (INT3)

Read more »

Sorting a ListView

Here is how you can use the OnColumnClick and OnCompare events of a TListView to let users sort the columns (ascending/descending) in a report-style list view by clicking on the column headers. This requires a global variable to keep track of the column that was clicked:
Read more »

Drag & Drop Files

How to enabled drag&drop from explorer to your window and retrieve a list of dropped files?

1. Enable your window (Form) to accept dropped files (DragAcceptFiles )
2. Add a message handler for WM_DROPFILES
3. Use DragQueryFile ( on WM_DROPFILES) to get the dropped files count and their full path.

Read more »

Printing a TBitmap with StretchDIBits

  The simple way to print a TBitmap is to use the Draw method of a TPrinter Canvas ThePrinterCanvas->Draw ( PositionX, PositionY, TheBitmap);. This works, except that on many machines this will fail to print (or print out too small). The following code will print the TBitmap at a size that is adjusted for the printer device using StretchDIBits. You could change the scaling and have it print to whatever size you want…
Read more »

Unicode files path

  Checking if a file or folder exists with FileExists and DirectoryExists (VCL) will not work on Unicode files path, so here are the Unicode versions…
Read more »