save and print

*please only if you are sure that you can solve my question send me an answer*

i am bulilding a comics studio for my project and i really need help in this subjects:

well i have a form and some imageboxs and textboxs on it .
the form and the images contains pictures. i need a code to print all of
them together (the form+images=one picture)...the last expert i asked send
me a code that printed all the pictures
in the imageboxs in full size and without the picture on the form...and that is not what i wanted.

the second code i need is to save the form with all the imageboxs and textboxs
in it was one picture.
thank you very much...
Who is Participating?
dosylConnect With a Mentor Commented:
Hi, i think i have your answer.

First question. To Print:
Just write Form1.PrintForm; but your pictures must be small like 100X100.

Second question to Save:
For my test i took 2 forms.
The first form:
You put your Images and Texts on this form.

Private Sub Form_Click()
Form2.Show 1
End Sub

Private Sub Form_Load()
Form1.WindowState = 2
End Sub

Second form:
I put a PictureBox on this form.
I resize it at the same size of the form.

Private Sub Form_Activate()
Dim X As Integer
Picture1.Top = 0
Picture1.Left = 0
Picture1.Height = Form2.ScaleHeight
Picture1.Width = Form2.ScaleWidth
Form2.Picture1.AutoRedraw = True

For X = 0 To 2
    Form2.Picture1.PaintPicture Form1.Image1(X).Picture, Form1.Image1(X).Left, Form1.Image1(X).Top, Form1.Image1(X).Width, Form1.Image1(X).Height
Picture1.CurrentX = Form1.Text1(X).Left
Picture1.CurrentY = Form1.Text1(X).Top
Picture1.Print Form1.Text1(X).Text

Next X

End Sub
The next sub is to save your picture, when you want to retrieve it you take LoadPicture method.

Private Sub Picture1_Click()
Dim Answer As Integer
Answer = MsgBox("Do you want to save the picture?", vbYesNo, "SAVE PICTURE")
If Answer = vbYes Then
    SavePicture Picture1.Image, "C:\Pic.bmp"
End If
End Sub
talchenAuthor Commented:
please again ,if you dont have the right
codes for my question... dont answer it
because the last expert send me an answer that didnt work.
Maybe this will help:

"HOWTO: Capture and Print the Screen, a Form, or any Window"
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Part 2:
Once you have captured the window or client area of the window, you can save the image to disk using SavePicture().
You can save your form apperance AS IS by inserting a picture box on your form, and then insert on the picture box, all the controls that are currently on your form. This is done easily by selecting all the controls on your form and then copying and pasting them alltogether on the picture box. Then in your code use SavePicture to save to file.
talchenAuthor Commented:
thank you all for helping me .
but i dont understand why cant i give some of the points to "Erick37"...wich was the first who helped me?
"Erick37" if you see this please send me acomment because i want to send you points.
thank you .
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.