How to Print Text

Posted December 15th @ 9:01 pm by m3Rlin

This is the harder way to print text in Delphi If you want to do it the easier way check out tip 4.1. Well, if for some reasons you may want to print using the Windows API here’s the code:
Code 1:

uses
Printers, WinSpool;

var
aDriver, aPort, aPrinterName: array[0..255] of Char; { aDriver and [...]

How to Remove the Form’s Caption

Posted December 15th @ 8:57 pm by m3Rlin

You may have wanted to create a form that doesn’t have a caption bar, just like the one’s you may see in setup programs. Delphi VCL doesn’t give you but you can also use the Windows API
Just add this code to you form’s OnCreate method:

SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) and not WS_CAPTION);
Height := Height - [...]

« Previous EntriesNext Entries »