29
Answers

Printpreview picturebox image

Robert

Robert

13y
15.2k
1
Wow, I thought there would be all kinds of information about how to print preview an image from a picturebox control, but I am not having much luck.

I thought what I want to do would be easy. Maybe it is and I am just missing something.

I have a picturebox which contains an image.
I want to view that image in the print preview control.

How can I do this? I thought it would be simple, but I can not find any good examples.
Thanks in advance for any help provided. If more information is needed, please let me know.

Answers (29)
0
Administrator

Administrator

Admin 2.3k 1.3m 22y
My mistake - it appears to work IF, and only if, the top control associated with the splitter is docked using the full docked property. Before I was trying with the bottom control using the full docked property. So in summary, it works if: topControl.Docked = DockStyles.Full; bottomControl.Docked = DockStyles.Bottom; I'm gonna submit some code for this one ;)
0
Administrator

Administrator

Admin 2.3k 1.3m 22y
I got similar error in DataGrid docked in new form after reloading DataSource in DataGrid when new record count is bigger then older and resising form(!). Workaround: myDataGrid.Dock=DockStyle.Top; myForm.Show(); myDataGrid.Dock=DockStyle.Fill; May be any trick like this will be useful.
0
Administrator

Administrator

Admin 2.3k 1.3m 22y
I haven't looked at this so I don't know if it's a bug or not, but if you are pretty sure it is you might want to add it to this site which has a list of some .NET bugs. Hopefully the guys at MS will check it out.