How can I make this PrintDocument visible to it's calls?

  • Thread starter Thread starter trint
  • Start date Start date
T

trint

PrintDocument pd = new PrintDocument();

Can I put it in "Class1.cs"?
If so, how can it become visible within the scope of the function of
it's call?
Class1.pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
Doesn't work.
Thanks,
Trint
 
Nevermind, I figured it out...Here is the solution:
In Class1
{
public static PrintDocument pd = new PrintDocument();
}

Thanks,
Trint
 
"YourNamespace".pd.PrintPage += new
PrintPageEventHandler(this.pd_PrintPage);
You have to use Namespace.pd instead of FileName.pd

Hope This Helps
 
Back
Top