How To…Create a Custom Print Dialog

Question

“How do I replace the existing print dialog with a custom one of my own?”

Solution

Use the built-in dialog replacement architecture to create and register your own print dialog.  Start by copying the existing dialog located in the ppPDlg.pas file and renaming the class and file name.  Finally inside the initialization and finalization sections, register the new dialog.

Download: CustomPrintDlg.zip

Sample Delphi code: