Changing the Title of a Print Dialog in Delphi

CK CK 3776 
Created at
Updated at  
1,091 0 0

The TPrintDialog component displays a standard Windows dialog box for sending jobs to a printer.

Unfortunately, the TPrintDialog does not expose the Title property.

By handing the OnShow event of a print dialog you can specify the text for the dialog’s title bar:

 //handles PrintDialog1.OnShow

 procedure TReportForm.PrintDialog1Show(Sender: TObject) ;
 begin
   if Sender is TPrintDialog then
     SetWindowText(
       TPrintDialog(Sender).Handle,
       'How do you want to print your report?') ;
 end;

 Note: a common dialog box opens when its Execute method is called.

Tags Print TPrintDialog WM_SYSCOMMAND Facebook X
Comments 0
Similar posts
  1. How to print external document ?
    413
  2. Adding Custom Paper Sizes To Named Printers
    643
  3. Print HTML In C# With Or Without The Web Browser Control And The Print Dialog
    971
  4. A Customizable Printing Text Class
    426
  5. Simplified .NET Printing In C#
    686
  6. How To Print Text In C#
    453
  7. Printing A Page
    376
  8. Get A Print Dialog Box By Clicking A Button
    817
  9. How To Show The Print Dialog And Print Text Files
    1,292
  1. Building a Simple DNS Server in Delphi with TTL Support
    676
  2. Run PowerShell Command as Administrator in Delphi
    651
  3. Run command with Administrator permission in Delphi on Microsoft Windows
    760
  4. Delphi code to send data to web server based on POST method
    1,025
  5. Good Delphi components
    920
  6. How to download/grap web pages or XML document at internet website in Delphi XE?
    865
  7. Delphi Program can command level execution program with hidden mode
    693
  8. How To Turn On/Off Monitor with Delphi
    843
  9. How to get application version number in Delphi
    1,544
  10. The Delphi function to get My Videos folder
    2,294
  11. Get Application Data Path on Delphi
    833
  12. I want to select directory(folder) not file. How can I do that ?
    614
  13. Auto Logon Programming in Delphi
    1,022
  14. Thread Application Implementation in TThread
    662
  15. Is there directory selection VCL component in Delphi ?
    513
  16. How to launch the external application in Delphi ?
    1,060
  17. How to print external document ?
    413
  18. Delphi API to get windows temporary directory
    571
  19. Delphi API to get the current working directory
    1,246
  20. How to resize PNG file in Delphi ?
    1,205
  21. Get the length of arrays and a string
    1,723
  22. Delphi Pointer Types
    21,717
  23. How to read/wrtie INI file in Delphi ?
    3,087
  24. How to get file created time, modified time, and last accessed time ?
    3,308
  25. Delphi string conversion functions - AnsiToUTF-8, UTF8Encode, ...
    643
  26. When subject is crashing in TIdSMTP VCL
    615
  27. How to send text/html based email in UTF-8 with TIdSMTP, TIdMessage VCL
    1,073
Recently updated
  1. How do I create animated background for Google Meet?
    19,002
  2. MaxMind GeoLite2 vs. DB-IP Lite vs. ip-api.com: Choosing the Right Free IP Geolocation Solution
    192
  3. Meet Valkey: Why Redis Changed Its License, Why Valkey is Better, and How to Use It as a Drop-in Replacement
    75
  4. How Rogue Web Scrapers Are Stealing My Content and Destroying My Server
    151
  5. Array of arguments passed to script in PHP
    83
  6. Invalid Auction Storms in Ad Tech
    91
  7. Building MRC-Compliant Instrumentation in Ad Tech: Implementation Steps and Key Challenges
    194
  8. The Two Clocks of Ad Server Architecture
    61
  9. Frequency Cap Architecture Overview
    505
  10. Collecting Proof-of-Play from 100,000 Screens
    139
  11. Vector Search in Relational Databases (RDBs): Trends & Usage Environments
    276
  12. What is RedisVL?
    102
  13. Designing a Skill Registry Architecture: Minimize Token Usage and Maximize AI Performance
    218
  14. TPU & GPU Cluster Management Tools
    229
  15. The Concept of Scaffolding in AI Agents
    217
  16. Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration
    568
  17. AI-DLC vs. AI-SDLC: Model-Centric vs. System-Centric AI Development
    246
  18. Fine-Tuning Open-Weight LLMs: Training, Licensing, and Deploying Custom Models with Ollama
    321
  19. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    196
  20. Machine Learning: Training vs. Ranking
    200
  21. The Continuous Learning Machine: Designing a Loop That Actually Turns
    212
  22. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    188
  23. Designing a Data Curation System Around a Vector Database
    212
  24. Extracting Context from Live Video: The Architecture Got Simpler When We Stopped Building Features
    228
  25. The New Ad Stack Behind Live Sports Streaming: Inside SGAI, EABN, and the Standards Race to Fix Live Monetization
    646
  26. Designing MLOps Architectures to Handle Seasonal Data Drift in EV Fleet Models
    180
  27. From 15 to 40+ FPS: Accelerating PyTorch Object Detection on Automotive ECUs
    203
  28. Understanding Data Lineage
    251
  29. System Requirements and Architecture: Intelligent Priority-Based Scheduler
    159
  30. GPU & LLM Cluster Infrastructure & Task Scheduling Architecture
    229