You are here: Home »

Builder

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

You like this post? Be the first of my friends to give me a beer! click here. Thanks!

Get User IP address

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

You like this post? Be the first of my friends to give me a beer! click here. Thanks!
June 16, 2007 | | Builder, C++, [ En ]

Comments Off

Reporting formatted errors

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

You like this post? Be the first of my friends to give me a beer! click here. Thanks!
June 14, 2007 | | Builder, [ En ]

Comments Off

Finding files…

read more

You like this post? Be the first of my friends to give me a beer! click here. Thanks!

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

You like this post? Be the first of my friends to give me a beer! click here. Thanks!
February 25, 2007 | | Builder, C++, [ En ]

Comments Off

BPX (INT3)

read more

You like this post? Be the first of my friends to give me a beer! click here. Thanks!

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

You like this post? Be the first of my friends to give me a beer! click here. Thanks!

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

You like this post? Be the first of my friends to give me a beer! click here. Thanks!
February 10, 2007 | | Builder, [ En ]

Comments Off

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

You like this post? Be the first of my friends to give me a beer! click here. Thanks!
February 2, 2007 | | Builder, [ En ]

Comments Off

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

You like this post? Be the first of my friends to give me a beer! click here. Thanks!
January 27, 2007 | | Builder, [ En ]

Comments Off