Sofari Agali

Sofari Agali

  • 1.5k
  • 276
  • 26.3k

Error using printpreviewdialpg

Sep 16 2020 3:52 AM
Hi!
Can anybody help me as to why I am getting this error: "the reference of the object is not set to an instance of an object"
here is the part of the code concerned
  1. private void button5_Click(object sender, EventArgs e)  
  2. {  
  3.            
  4.     printPreviewDialog.Document = printDocument;  
  5.   
  6.     printPreviewDialog.ShowDialog();  
  7. }

Answers (2)