470,870 Members | 1,418 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,870 developers. It's quick & easy.

HasMorePages = true doesn't let me jump to next page

Leo
I set HasMorePages to true, but it doesn't let me jump to next page.
(Of course, if I remove the HasMorePages = false in my if statement, it
will create hundreds of pages). Any suggestion? Thanks in advance.

Leo

My code to call the print event:

....
{
m_PrintDoc = new PrintDocument();
m_PrintDoc.PrintPage += new
PrintPageEventHandler(this.OnPrintPage);
m_PrintDoc.DefaultPageSettings.Landscape = false;
m_PrintDoc.DocumentName = "Wall Layout";

m_Preview = new PrintPreviewDialog();
((Form)m_Preview).WindowState = FormWindowState.Maximized;
m_Preview.Document = m_PrintDoc;
m_Preview.ShowDialog();
m_Preview.Dispose();

...
}

private void OnPrintPage(object sender,PrintPageEventArgs e)
{

ArrayList lumberList = m_Wall.GetLumberListBySize();
for (int i = 0; i < lumberList.Count; i++)
{
if (m_yPos > m_BottomMargin)
{
m_yPos = m_TopMargin;
e.HasMorePages = true;
}
else
e.HasMorePages = false;
...
}
}

Apr 19 '06 #1
0 1118

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Mr. B | last post: by
reply views Thread by creedence | last post: by
reply views Thread by Scotty | last post: by
2 posts views Thread by GGSoft | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.