c# - send PrindDocument to another form -


I want to show the printDocument in another form that has been placed in the second way in print preview control.

form1

  public system. Drawing Printing Print documents document;   

form2 code

  private zeros form 2_load (object sender, eventArgues e) {form 1 form 1 = new form 1; PrintPreviewControl.Document = form1.printDocument; }  

I'm sure printDocument has a document to print in form1, but when form2 is loaded, nothing is shown on the print preview control. Should the method of the print document call in Form 1 before showing Form2?

Your example should work fine, but PrintPreviewControl is only associated with print documents during the PrintPage event Is fed during.

If you are not doing anything during the print page event, print preview will be an empty document.

It is likely that if you put printproof control on Form 1, you will receive it same behavior.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -