Click here to Skip to main content
15,923,142 members
Home / Discussions / C#
   

C#

 
GeneralRe: Coding Standard and Code Review Pin
James T. Johnson27-Mar-02 19:57
James T. Johnson27-Mar-02 19:57 
GeneralRe: Coding Standard and Code Review Pin
Kevin McFarlane28-Mar-02 7:59
Kevin McFarlane28-Mar-02 7:59 
GeneralWierd collection problem Pin
27-Mar-02 7:05
suss27-Mar-02 7:05 
GeneralRe: Wierd collection problem Pin
Andy Smith27-Mar-02 7:14
Andy Smith27-Mar-02 7:14 
GeneralComplex configuration files Pin
Michael Groeger27-Mar-02 6:59
Michael Groeger27-Mar-02 6:59 
Questionhow to preserve background after invalidate? Pin
Rüpel27-Mar-02 3:36
Rüpel27-Mar-02 3:36 
GeneralAssociated Files Pin
Nick Parker27-Mar-02 2:38
protectorNick Parker27-Mar-02 2:38 
GeneralPrinting Pin
Mazdak27-Mar-02 1:41
Mazdak27-Mar-02 1:41 
I use this code for printpage:
private void printDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
  int x = e.MarginBounds.Left+70;
  int y = e.MarginBounds.Top;
  try
  {
   for (int i=0;i<100;i++)
   {
      e.Graphics.DrawString( i.ToString(), new Font("Arial", 10), Brushes.Red, x, y);
      y+=15;
      if (y >= e.MarginBounds.Bottom)
      {
	  e.HasMorePages = true;
	  return;
      }
  }
  e.HasMorePages = false;
 }
  catch(Exception myE)
  {
    MessageBox.Show("Problem!!" + myE.ToString());
  }
		
}


The problem is now I don't have two page from 1 to 100,my both pages in printpreview are the same and it draw second page the same as first one,not proceed it.
I hope it is clear.

Thanks


Mazy

"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975

GeneralRe: Printing Pin
Rüpel27-Mar-02 1:52
Rüpel27-Mar-02 1:52 
GeneralRe: Printing Pin
Mazdak27-Mar-02 1:56
Mazdak27-Mar-02 1:56 
Generalstring array Pin
Mazdak26-Mar-02 21:27
Mazdak26-Mar-02 21:27 
GeneralRe: string array Pin
SimonS26-Mar-02 21:48
SimonS26-Mar-02 21:48 
GeneralRe: string array Pin
Mazdak26-Mar-02 22:09
Mazdak26-Mar-02 22:09 
Generalbackup Pin
BLaZiNiX26-Mar-02 19:01
BLaZiNiX26-Mar-02 19:01 
GeneralRe: backup Pin
James T. Johnson26-Mar-02 23:10
James T. Johnson26-Mar-02 23:10 
GeneralRe: backup Pin
BLaZiNiX27-Mar-02 15:35
BLaZiNiX27-Mar-02 15:35 
GeneralRe: backup Pin
James T. Johnson27-Mar-02 18:09
James T. Johnson27-Mar-02 18:09 
QuestionDynamically assign QueryString to SRC? Pin
26-Mar-02 13:02
suss26-Mar-02 13:02 
AnswerRe: Dynamically assign QueryString to SRC? Pin
David Wengier26-Mar-02 13:18
David Wengier26-Mar-02 13:18 
GeneralRe: Dynamically assign QueryString to SRC? Pin
26-Mar-02 13:44
suss26-Mar-02 13:44 
GeneralRe: Dynamically assign QueryString to SRC? Pin
David Wengier26-Mar-02 13:52
David Wengier26-Mar-02 13:52 
GeneralMatlab & C# Pin
26-Mar-02 8:25
suss26-Mar-02 8:25 
QuestionCapturing Cursor Keys? Pin
Zombies with Coffee, LLC26-Mar-02 7:54
professionalZombies with Coffee, LLC26-Mar-02 7:54 
AnswerRe: Capturing Cursor Keys? Pin
James T. Johnson26-Mar-02 8:11
James T. Johnson26-Mar-02 8:11 
GeneralRe: Capturing Cursor Keys? Pin
Zombies with Coffee, LLC26-Mar-02 8:17
professionalZombies with Coffee, LLC26-Mar-02 8:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.