01-10-2005, 08:19 AM
How can i print the picturebox which is inside nother PictureBox in a form.
I dont want to print the full form (using form_name.printform) because it contains scroll bars which I dont want to be included in the PrintOut
The Picture Box also contains plenty of other controls including, textboxes, labels, images(logo),mshflexgrid.
01-10-2005, 01:39 PM
TryPrivate Sub Command1_Click()
Printer.PaintPicture Me.Picture1.Picture, Me.Picture1.Left, Me.Picture1.Height
01-11-2005, 03:38 AM
I used the following
Printer.PaintPicture frmDIPicture.picInner.Picture, frmDIPicture.picInner.Left, frmDIPicture.picInner.Height
Where frmDIPicture is a form which contains a picturebox picOuter.This picOuter contains picInner Picturebox with a bunch of textbox,labels and mshflexgrid controls
But it is giving an error
Invalid picture (Error 481)
Which says that(REf: MSDN Library)
An invalid graphics format was assigned to the Picture property. This error has the following cause and solution:
You tried to assign a graphics format other than a bitmap, icon, or Windows metafile to the Picture property of a form or control.
Ensure that the file you are trying to load into the Picture property is a valid graphics file supported by Visual Basic.
At the time of the error the value of frmDIPicture.picInner.Picture is "0"
Please Help Thank You