views:

92

answers:

2

Currently i'm using the PrintPreviewDialog to open a window to preview the printed pages before they are sent to a printer. The problem is though that it first appears very small, at the top left of the screen and the buttons are too small.

alt text

Is there anyway i can set a starting size for this dialog or start position or even make the little buttons a little bigger? Or do i need to implement my own?

+1  A: 

You can get the toolstrip. Been a while since I used a toolstrip. But I would think you could make it work...

    Dim cnts As Form.ControlCollection = Me.PrintPreviewDialog1.Controls
    Dim toolstrp As ToolStrip = DirectCast(cnts(1), ToolStrip)
    toolstrp.Height = 50

    Dim tsbtn As ToolStripButton = toolstrp.Items(0)
    tsbtn.AutoSize = False
    tsbtn.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText
    tsbtn.Size = New Size(65, 50)

    Me.PrintPreviewDialog1.ShowDialog()
eschneider
sorry, that's VB, but think you get the idea...
eschneider
Nice work-around, i guess i could access and mess about with lots of properties like this. In the end though, i've implemented my own print preview dialog.
Gary Willoughby
A: 

alt text

This is my own PrvDialog. You can create a new Form, add to it a new ToolStrip, a PrintPreviewControl and implement your PrintPreviewDialog Funcionality.

This is a simple option. More simple than try to modify original PrintPreviewDialog behavior.

You can see sample at Code-Project. An Enhaced PrintPreviewDialog (CoolPrintPreviewDialog).

x77
Thanks, i did indeed implement my own which was more simple than trying to work with the built in one.
Gary Willoughby