• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

save a graphic as an image


i need to save a graphic and the problem is that the graphic is composed of two picture sets picture1 is where i create the graphic and picture3 i where i draw the scale so i need to save the graphic and the scale as one picture.

So if i use SavePicture Picture1.Image, strsavefile i only get the graphic but not the scale

Any ideas?
  • 2
1 Solution
Is Picture3 overlapping Picture1?

If so, you will need to paint the contents of Picture3 onto Picture1 (using the PaintPicture method or BitBlt API), and then save Picture1.

Something like this...

    Picture1.PaintPicture Picture3.Image, Picture3.Left, Picture3.Top, Picture3.Width, Picture3.Height, 0, 0, Picture3.Width, Picture3.Height

...and then SavePicture.
Mike TomlinsonMiddle School Assistant TeacherCommented:
...or use screen capturing code to get the composite image and then save the capture:

Microsoft has a great project in their Knowledge Base that does screenshots via API's only...

The routines in the example can:

Capture the entire contents of a form.
Capture the client area of a form.
Capture the entire screen.
Capture the active window on the screen.
Capture any portion of any window given a handle to it.
Create a Picture object from a bitmap and a palette.
Print a Picture object as large as possible on the page.

It can be found here:
data2002Author Commented:
thank you
Glad to help

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now