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
- private void button5_Click(object sender, EventArgs e)
- {
- printPreviewDialog.Document = printDocument;
- printPreviewDialog.ShowDialog();
- }


Amit GuptaRank #190 · 12.8K reputationPosted Sep 16, 2020, 1:27 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Sep 20, 2020, 2:35 AM EDT