469,903 Members | 1,945 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

PrintPreviewControl

On initialization of my form, I am setting up PrintPreviewControl like this:
private void InitializePrintPreviewControl()
{
this._ppreview = new ICS.Client.Controls.PrintPreview();
//
// _ppreview
//
this._ppreview.AutoScroll = true;
this._ppreview.BackColor = System.Drawing.SystemColors.Window;
this._ppreview.Cursor = System.Windows.Forms.Cursors.Default;
this._ppreview.Dock = System.Windows.Forms.DockStyle.Fill;
this._ppreview.Location = new System.Drawing.Point(0, 0);
this._ppreview.Name = "_ppreview";
this._ppreview.Size = new System.Drawing.Size(592, 432);
this._ppreview.ImagePreview.Document = _docToPrint;
this._ppreview.TabIndex = 0;
this._docToPrint.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this .doc_PrintPage);
this._ppreview.UpdatePreview += new PrintSettingsModified(_ppreview_UpdatePreview);
this.ImageEditor_Fill_Panel.Controls.Add(this._ppr eview);
}


This code works perfectly fine just like it is.

But the problem is When a user presses the button to switch between
landscape and portrait, the UpdatePreview eventhandler is called, which
has code like this:

this._docToPrint.DefaultPageSettings.Landscape = true or false;

when this code is run, the control state does not change. i have tried
everything to update the printpreviewcontrol with the new landscape or
portrait setting, but nothing has worked.
I called invalidate(), removed the event handler for PrintPage, changed
the landscape property, and then reattached the event handler for
PrintPage, it still does not work.

I'll appreciate any help.

Basically what I am trying to do is, when by default, PrintPreview shows
the document in portrait, user can press the button to swtich between
Portrait and Landscape.

Thanks
Ali
Nov 16 '05 #1
0 2170

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Chad Chisholm | last post: by
reply views Thread by s-galit | last post: by
reply views Thread by sachin | last post: by
reply views Thread by sachin | last post: by
reply views Thread by Yaron | last post: by
reply views Thread by Chad Chisholm | last post: by
3 posts views Thread by IB | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.