Discussion:
How to regenerate a PrintPreviewDocument...
(too old to reply)
Lucio Menci
2010-02-10 09:43:01 UTC
Permalink
Hi all,

I inserted in a project a PrintPreviewDialog where I added some checks in
the toolstrip:

For Each Txt As String In New String() {"Include section A","Include
section B","Include section C","Include section D","Include section
E","Include section F"}
Dim Cmd As ToolStripButton
Cmd = New ToolStripButton(Txt)
Cmd.Name = Txt
Cmd.CheckOnClick = True
AddHandler Cmd.Click, AddressOf CmdChangePrintOptions
CType(PrintPreview.Controls("toolStrip1"), ToolStrip).Items.Add(Cmd)
Next Txt

I was able to print the selected sections, but I wasn't able to say to the
PrintPreviewDialog to regenerate the document when I click one of the buttons.
Lucio Menci
2010-02-10 10:36:01 UTC
Permalink
I found it
PrintPreview.PrintPreviewControl.InvalidatePreview()
Post by Lucio Menci
Hi all,
I inserted in a project a PrintPreviewDialog where I added some checks in
For Each Txt As String In New String() {"Include section A","Include
section B","Include section C","Include section D","Include section
E","Include section F"}
Dim Cmd As ToolStripButton
Cmd = New ToolStripButton(Txt)
Cmd.Name = Txt
Cmd.CheckOnClick = True
AddHandler Cmd.Click, AddressOf CmdChangePrintOptions
CType(PrintPreview.Controls("toolStrip1"), ToolStrip).Items.Add(Cmd)
Next Txt
I was able to print the selected sections, but I wasn't able to say to the
PrintPreviewDialog to regenerate the document when I click one of the buttons.
Loading...