How to Snap a Window to the Screen Edge

Posted December 15th @ 2:00 pm by m3Rlin

WinAMP has this very useful feature. If you drag it to the edge of the screen it will automatically position itself. Sometimes you want to make room on the screen but you don’t want to minimize your program and again you want to see it in full. The only way is the put it in [...]

How to Get a String’s Width in Pixels, Not in Characters

Posted December 15th @ 7:27 am by m3Rlin

To determine the width of a string in pixels using the active font and output it’s best to use this method:

(* sString - (string) Can be any string constant or variable.
**
** For example:
** TCanvas.TextWidth(’m3Rlin’);
** TCanvas.TextWidth(Edit1.Text);
** TCanvas.TextWidth(OpenDialog1.FileName);
[...]

Next Entries »