Click here to Skip to main content
11,633,969 members (79,810 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Windows
I am performing printing in a C# application using charts. Whenever i send a document for printing, a message pops up "Printing one of the document". I don't want this message to appear, i.e the document should get printed but that printing dialogue (or message) should not be visible. Please suggest some solution for it. I know it is a message from windows not from the C# application, but there should be some way to control it, either through windows printer settings or in my code.
Posted 25-Jan-12 20:39pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please paste in the relevant code, so I can take a look...
  Permalink  
Comments
Anuja Pawar Indore at 27-Jan-12 2:40am
   
Use comment block, instead of posting it as an answer
Zil-e-Huma at 31-Jan-12 0:18am
   
Here is the portion of code. This code is about printing a small pulse. The only thing which i am interested in is that the dialogue stating "Printing 1 of the document" should not appear


chart.Series["Series4"].Points.AddY(80);
chart.Series["Series3"].Points.AddY(65);
chart.Series["Series2"].Points.AddY(50);
chart.Series["Series1"].Points.AddY(35);


for (int i = 1; i < 47; i++)
{

chart.Series["Series4"].Points.AddY(85);
chart.Series["Series3"].Points.AddY(70);
chart.Series["Series2"].Points.AddY(55);
chart.Series["Series1"].Points.AddY(40);
}



chart.Series["Series4"].Points.AddY(80);
chart.Series["Series3"].Points.AddY(65);
chart.Series["Series2"].Points.AddY(50);
chart.Series["Series1"].Points.AddY(35);


chart.Series["Series1"].ChartType = SeriesChartType.FastLine;

chart.Printing.PrintDocument.DefaultPageSettings.Landscape = true;
chart.Printing.PrintDocument.DefaultPageSettings.Margins.Left = 0;
chart.Printing.PrintDocument.DefaultPageSettings.Margins.Top = 0;
chart.Printing.PrintDocument.DefaultPageSettings.Margins.Right = 0;
chart.Printing.PrintDocument.DefaultPageSettings.Margins.Bottom = 0;
chart.Printing.PrintDocument.PrinterSettings.PrinterName = NormalPrinter;
chart.Printing.Print(false);

chart.Series["Series1"].Points.Clear();
chart.Series["Series2"].Points.Clear();
chart.Series["Series3"].Points.Clear();
chart.Series["Series4"].Points.Clear();

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,658
1 Sergey Alexandrovich Kryukov 8,204
2 Mika Wendelius 6,645
3 F-ES Sitecore 2,321
4 Suvendu Shekhar Giri 2,095


Advertise | Privacy | Mobile
Web04 | 2.8.150728.1 | Last Updated 26 Jan 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100