Home > Net >  How to only a print preview
How to only a print preview

Time:10-08

Using a third party form the print preview, PrintPreview ();

Click for the, invokes the table1. PrintPreview ();

In closing if click multiple times, for the first click on the print preview pages generated after, will once again appear, click on how many times, how many times will be generated,

How to set up, just can't do that? Thank you

Private void button2_Click (object sender, EventArgs e)
{
Table1. PrintPreview ();
}

CodePudding user response:

Define a variable to determine whether has been generated,
For example:
Int I=0
Private void button2_Click (object sender, EventArgs e)
{
If (i<1)
{
Table1. PrintPreview ();
i++;
}
}

CodePudding user response:

Testing shall be null and void
  •  Tags:  
  • C#
  • Related