Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
C# Winform PrintDialog Pages popup

in C# Winform, i'm sending an Image to the printer using the PrintDialog... using this code:

       private void PrintSnippedImage()
    {
        PrintDocument pDoc = new PrintDocument();
        pDoc.PrintPage += PrintPage;

        PrintDialog pDialog = new PrintDialog();
        pDialog.ShowHelp = true;
        pDialog.AllowSelection = false;
        pDialog.AllowSomePages = false;
        pDialog.Document = pDoc;
        if (pDialog.ShowDialog() == DialogResult.OK)
        {
            pDoc.Print();
        };
    }

    private void PrintPage(object o, PrintPageEventArgs e)
    {
        System.Drawing.Image img = Glob.SnippedImage;
        Point loc = new Point(10, 10);
        e.Graphics.DrawImage(img, loc);
    }

I get a popup that shows "Printing... Page 1 of document" with a Cancel button. it appears in seemingly random locations on one of my monitors.

is there a way to inhibit this popup, or at least force it to appear on the monitor in the general location of the application that called it?

it looks like this:

popup window

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It should be a case of swapping the PrintController implementation from PrintControllerWithStatusDialog (the default) to StandardPrintController. See https://docs.microsoft.com/en-us/dotnet/api/system.drawing.printing.printdocument.printcontroller?view=dotnet-plat-ext-6.0#system-drawing-printing-printdocument-printcontroller

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!