Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
Basic question I am having difficulties trying to get a program to print out the contents of a Rich Text Box, I have done this in 2003 Net 1.0 never had the need in Net 2.0 (until now)
I have dragged the Print Dialog to the form,
C#
MessageBox.Show("here!");
PrintDialog pd = new PrintDialog();
PrinterSettings ps = new PrinterSettings();
DialogResult dr = pd.ShowDialog();
pd.PrinterSettings = ps;
pd.UseEXDialog = true;
pd.ShowDialog();

if (dr == DialogResult.OK)
{

}

Enter the above code to get the Dialog to appear, it doesn't and now I am confused. As it does not error or do anything???
There seem to be lots of examples for getting around the dialog, but a lack of this is how you do it.
Glenn
Posted
Updated 28-Oct-13 5:31am
v3

Try adding this line:
C#
pd.UseEXDialog = true; 
 
Share this answer
 
Comments
glennPattonWork3 28-Oct-13 11:27am    
Added no effect??
glennPattonWork3 28-Oct-13 12:02pm    
Added to right bit of code gives the dialog!
Hi, thanks to Marc Gabrie and other I have solved this I was using the wrong component I should have been using the printDocument to actually get the print out wanted, man that was puzzling!
Glenn
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900