YOu would use the VBPictureBox class on my site.
Create three instances of the class
Load the 2 saved Jpeg images into individual instances of the class
Resize the blank third instance of the class to enable it to contain the
Image dimensions from the first two instances.
Blit the contents of the first two classes into the third
Save the third instance to disk as a Bitmap file
All of the required methods and properties are exposed by the
vbPictureBox class.
http://www.lebans.com/imageclass.htm
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"David Lauberts" <david.lauberts@ntlworld.com> wrote in message
news:wlzqb.1381$us.824@newsfep3-gui.server.ntli.net...[color=blue]
> Stephen
>
> Thanks for taking the time to respond.
>
> Yes, on the form on one is a 'background' graph and one overlays it in[/color]
the[color=blue]
> 'fore ground'. I can get each graph out as a JPEG, GIF or TIF and if I[/color]
could[color=blue]
> combine them so they 'overlay' each other that would great.
>
> I have looked at your website - would I be right in saying the code to[/color]
be[color=blue]
> modified is contained in A2KExportOLEtoJPEG.zip in Misc?
>
> Regards
> Dave
>
> "Stephen Lebans"[/color]
<ForEmailGotoMy.WebSite.-WWWdotlebansdotcom@linvalid.com>[color=blue]
> wrote in message news:Y9hqb.8361$R13.465338@ursa-nb00s0.nbnet.nb.ca...[color=green]
> > SO you simply want to able to programmatically combine the 2[/color][/color]
exported[color=blue][color=green]
> > jpeg images of the graphs into one single Jpeg? You could modify a[/color][/color]
bit[color=blue][color=green]
> > of code from my site to easily do this.
> >
> > --
> >
> > HTH
> > Stephen Lebans
> >
http://www.lebans.com
> > Access Code, Tips and Tricks
> > Please respond only to the newsgroups so everyone can benefit.
> >
> >
> > "David Lauberts" <david.lauberts@ntlworld.com> wrote in message
> > news:tLWpb.1131$CJ1.310@newsfep1-gui.server.ntli.net...[color=darkred]
> > > Hi Stephen
> > >
> > > From my point of view I have 2 graphs on a form, exporting the[/color][/color][/color]
whole[color=blue][color=green]
> > form as[color=darkred]
> > > a JPEG would solve my problem going forward though I have used[/color][/color][/color]
Peter's[color=blue][color=green]
> > Print[color=darkred]
> > > screen as a temporary measure for the moment. It would be ideal if[/color]
> > there was[color=darkred]
> > > some code to drop 2 graph objects on a form into a JPEG but if[/color][/color][/color]
there[color=blue][color=green]
> > is a[color=darkred]
> > > way I don't seem able to acheive it.
> > >
> > > Dave
> > > "Stephen Lebans"[/color]
> > <ForEmailGotoMy.WebSite.-WWWdotlebansdotcom@linvalid.com>[color=darkred]
> > > wrote in message[/color][/color][/color]
news:5iQpb.7408$R13.416379@ursa-nb00s0.nbnet.nb.ca...[color=blue][color=green][color=darkred]
> > > > There might be a very simple solution depending on:
> > > > 1) What is the output resolution of your label printer?
> > > > 2) What version of WIndows are you running?
> > > > 3) What version of Access?
> > > > 4) What is the current display resolution of the monitor[/color][/color][/color]
previewing[color=blue][color=green]
> > the[color=darkred]
> > > > report?
> > > >
> > > > I have code here somewhere that can copy the Report Print[/color][/color][/color]
Preview[color=blue][color=green]
> > window[color=darkred]
> > > > to a disk based Image file. SInce your output area is only 4[/color][/color][/color]
inches[color=blue][color=green]
> > by 4[color=darkred]
> > > > inches, depending on your screen resolution and the printers[/color][/color][/color]
output[color=blue][color=green][color=darkred]
> > > > resolution(I'm guessing it is only 198 DPI), you may be able to[/color]
> > simply[color=darkred]
> > > > capture the Print Preview window.
> > > >
> > > > Alternatively, the ReportUtilites on my site can output each[/color][/color][/color]
page at[color=blue][color=green][color=darkred]
> > > > full printer resolution to an ENhanced Metafile. It would only[/color][/color][/color]
take[color=blue][color=green]
> > a[color=darkred]
> > > > bit mroe work instead save these EMF's programmatically to a[/color][/color][/color]
Bitmap[color=blue][color=green]
> > or[color=darkred]
> > > > Jpeg file.
> > > >
> > > > --
> > > >
> > > > HTH
> > > > Stephen Lebans
> > > >
http://www.lebans.com
> > > > Access Code, Tips and Tricks
> > > > Please respond only to the newsgroups so everyone can benefit.
> > > >
> > > >
> > > > "Peter Flick" <pflick@bigpondXXremoveXX.net.au> wrote in message
> > > > news:deOpb.178545$bo1.118114@news-server.bigpond.net.au...
> > > > > Stephen,
> > > > >
> > > > > We have a data base of recipes and ingredients. Using MSAccess[/color][/color][/color]
we[color=blue][color=green][color=darkred]
> > > > > construct a label which includes all the legally required
> > > > > information. The label information is designed to be printed[/color][/color][/color]
onto[color=blue][color=green]
> > a[color=darkred]
> > > > > preprinted base label by a label printer on a packaging[/color][/color][/color]
machine.[color=blue][color=green]
> > One[color=darkred]
> > > > > label printer (Intermec, in fact we wrote our own label design
> > > > > software for the Intermec using MSAccess) is able to handle a
> > > > > MSAccess report format, and one label printer (Hapa) is able[/color][/color][/color]
to[color=blue][color=green][color=darkred]
> > > > > handle the image as .pdf, however our other label printers
> > > > > (Smartdates and Easycoders) require a graphics image.
> > > > >
> > > > > The nutritional panel has a prescribed format which includes[/color]
> > columns[color=darkred]
> > > > > of data and boxes.
> > > > >
> > > > > The label includes the ingredient statement, the allergens and[/color][/color][/color]
the[color=blue][color=green][color=darkred]
> > > > > nutritional panel all of which are calculated each time the[/color][/color][/color]
label[color=blue][color=green]
> > is[color=darkred]
> > > > > printed, to ensure that any changes to the underlying recipe[/color][/color][/color]
have[color=blue][color=green][color=darkred]
> > > > > been updated on the label. Our system overcomes the[/color][/color][/color]
possibility of[color=blue][color=green]
> > a[color=darkred]
> > > > > product recall because of a change in a recipe not being
> > > > > incorporated into the data on the label.
> > > > >
> > > > > We have a nominal range of just under 500,000 products, so it[/color][/color][/color]
is[color=blue][color=green][color=darkred]
> > > > > more convenient to generate the label and the carton label at[/color][/color][/color]
the[color=blue][color=green][color=darkred]
> > > > > time a particular product is made. All products are[/color][/color][/color]
crosschecked[color=blue][color=green][color=darkred]
> > > > > (Recipe barcode, label barcode, carton barcode, packaging[/color][/color][/color]
machine[color=blue][color=green][color=darkred]
> > > > > barcode and the storage coolroom barcode) by a wireless[/color][/color][/color]
Intermec[color=blue][color=green][color=darkred]
> > > > > barcode system which is integrated into our MSAccess system[/color][/color][/color]
which[color=blue][color=green][color=darkred]
> > > > > also updates our accounting system via the MSAccess ODBC[/color][/color][/color]
driver.[color=blue][color=green][color=darkred]
> > > > >
> > > > > So basically the problem is being able to output a whole[/color][/color][/color]
MSAccess[color=blue][color=green][color=darkred]
> > > > > report page (it is only 100mm x 100mm) as a bitmap image.
> > > > >
> > > > > Thanks
> > > > >
> > > > > Peter
> > > > >
> > > > >
> > > > >
> > > > > Stephen Lebans wrote:
> > > > > > Peter I'm not sure exactly what process are you trying to[/color]
> > automate.[color=darkred]
> > > > DO
> > > > > > you need to export the image of 2 Graphs contained on a Form[/color][/color][/color]
and[color=blue][color=green][color=darkred]
> > > > then
> > > > > > save this output as a single Jpeg file? Is it just the[/color][/color][/color]
graphs[color=blue][color=green]
> > you[color=darkred]
> > > > want
> > > > > > exported or the whole Form as it appears on the screen?
> > > > > >
> > > > > > --
> > > > > >
> > > > > > HTH
> > > > > > Stephen Lebans
> > > > > >
http://www.lebans.com
> > > > > > Access Code, Tips and Tricks
> > > > > > Please respond only to the newsgroups so everyone can[/color][/color][/color]
benefit.[color=blue][color=green][color=darkred]
> > > > > >
> > > > > >
> > > > > > "Peter Flick" <pflick@bigpondXXremoveXX.net.au> wrote in[/color][/color][/color]
message[color=blue][color=green][color=darkred]
> > > > > > news:WDrpb.176978$bo1.146297@news-server.bigpond.net.au...
> > > > > >
> > > > > >>Wayne,
> > > > > >>
> > > > > >>Thanks for your information. It does not change much. The[/color]
> > MSAccess[color=darkred]
> > > > > >>report still has to be copied using non-MSAccess software[/color][/color][/color]
and[color=blue][color=green]
> > then[color=darkred]
> > > > > >>worked on to produce a useable graphic image.
> > > > > >>
> > > > > >>We use online printing equipment, that refer to the MSAccess
> > > > > >>database for the information to print. It would be nice if[/color][/color][/color]
the[color=blue][color=green]
> > whole[color=darkred]
> > > > > >>of the label information generated by MSAccess could be[/color][/color][/color]
uplifted[color=blue][color=green][color=darkred]
> > > > > >>directly from the report.
> > > > > >>
> > > > > >>One of our printers has Swiss software that is able to[/color][/color][/color]
handle[color=blue][color=green]
> > .pdf[color=darkred]
> > > > > >>files directly, that makes the process a little easier.
> > > > > >>Unfortunately the others are looking for a graphics image.
> > > > > >>
> > > > > >>Please note an error in my reply to David. The .jpg files[/color][/color][/color]
would[color=blue][color=green]
> > need[color=darkred]
> > > > > >>to be exported from CorelDraw, not saved.
> > > > > >>
> > > > > >>We hope that at some time in the future MSAccess may[/color][/color][/color]
incorporate[color=blue][color=green][color=darkred]
> > > > > >>some basic graphics interfaces.
> > > > > >>
> > > > > >>Regards
> > > > > >>
> > > > > >>Peter
> > > > > >>
> > > > > >>Wayne Gillespie wrote:
> > > > > >>
> > > > > >>>On Mon, 3 Nov 2003 06:54:19 -0000, "David Lauberts"
> > > > > >
> > > > > > <david.lauberts@ntlworld.com> wrote:
> > > > > >
> > > > > >>>You could try Stephen Lebans site
> > > > > >
> > > > > >
http://www.lebans.com/ReportUtilities.htm his Report Utilies
> > > > download
> > > > > > allows you to save a report as an EMF or WMF
> > > > > >
> > > > > >>>file. This file could then be converted to a jpg if[/color][/color][/color]
required.[color=blue][color=green][color=darkred]
> > > > > >>>You would have to build a report showing your graphs in[/color][/color][/color]
order[color=blue][color=green]
> > to[color=darkred]
> > > > use
> > > > > >
> > > > > > this method. The easiest way to do this is to right click on[/color]
> > your[color=darkred]
> > > > form
> > > > > > in the
> > > > > >
> > > > > >>>database window and select "Save As Report". This will[/color][/color][/color]
create a[color=blue][color=green]
> > new[color=darkred]
> > > > > >
> > > > > > report based on your form which you can edit to suit your[/color][/color][/color]
needs.[color=blue][color=green][color=darkred]
> > > > > >
> > > > > >>>
> > > > > >>>
> > > > > >>>>Peter
> > > > > >>>>
> > > > > >>>>I used print screen and MS Paint, thanks for the tip, but[/color][/color][/color]
I[color=blue][color=green]
> > was[color=darkred]
> > > > just
> > > > > >>>>wondering if the was a way to do it directly using vb[/color][/color][/color]
using a[color=blue][color=green][color=darkred]
> > > > > >
> > > > > > command button
> > > > > >
> > > > > >>>>for future work.
> > > > > >>>>
> > > > > >>>>Anyone know if it can be done?
> > > > > >>>>
> > > > > >>>>Regards
> > > > > >>>>Dave
> > > > > >>>>"Peter Flick" <pflick@bigpondXXremoveXX.net.au> wrote in[/color]
> > message[color=darkred]
> > > > > >>>>news:KV3pb.175091$bo1.104182@news-server.bigpond.net.au...
> > > > > >>>>
> > > > > >>>>
> > > > > >>>>>Hi David,
> > > > > >>>>>
> > > > > >>>>>The only options I have found to convert a MS Access[/color][/color][/color]
report[color=blue][color=green]
> > as a[color=darkred]
> > > > > >>>>>graphic into something useable by any other software:
> > > > > >>>>>
> > > > > >>>>>Convert to .pdf using Acrobat Writer and then open .pdf[/color][/color][/color]
using[color=blue][color=green][color=darkred]
> > > > > >>>>>CorelDraw / save as .jpg
> > > > > >>>>>
> > > > > >>>>>or
> > > > > >>>>>
> > > > > >>>>>Print Screen / paste into CorelDraw (or other graphics[/color]
> > program)/[color=darkred]
> > > > > >>>>>edit bitmap / crop bitmap (to eliminate what is not[/color][/color][/color]
required[color=blue][color=green]
> > on[color=darkred]
> > > > the
> > > > > >>>>>screen) / save as .jpg
> > > > > >>>>>
> > > > > >>>>>If anyone has a better idea I would love to hear it.
> > > > > >>>>>
> > > > > >>>>>Peter
> > > > > >>>>>
> > > > > >>>>>
> > > > > >>>>>
> > > > > >>>>>David Lauberts wrote:
> > > > > >>>>>
> > > > > >>>>>
> > > > > >>>>>>Hi
> > > > > >>>>>>
> > > > > >>>>>>Wonder if someone has some words of wisdom.
> > > > > >>>>>>
> > > > > >>>>>>I have a access 2002 form that contains 2 graph objects[/color][/color][/color]
that[color=blue][color=green][color=darkred]
> > > > > >
> > > > > > overlay
> > > > > >
> > > > > >>>>each
> > > > > >>>>
> > > > > >>>>
> > > > > >>>>>>other and would like to export them as a JPEG to use in[/color][/color][/color]
a[color=blue][color=green][color=darkred]
> > > > > >
> > > > > > presentation.
> > > > > >
> > > > > >>>>I
> > > > > >>>>
> > > > > >>>>
> > > > > >>>>>>can do this individually for each graph but this does[/color][/color][/color]
not[color=blue][color=green]
> > help[color=darkred]
> > > > me
> > > > > >
> > > > > > as I
> > > > > >
> > > > > >>>>need
> > > > > >>>>
> > > > > >>>>
> > > > > >>>>>>both on the same JPEG. I thought I would try an export[/color][/color][/color]
the[color=blue][color=green]
> > form[color=darkred]
> > > > > >
> > > > > > that
> > > > > >
> > > > > >>>>>>contains both but I am having trouble. (My VBA is self[/color]
> > taught[color=darkred]
> > > > and
> > > > > >
> > > > > > a
> > > > > >
> > > > > >>>>little
> > > > > >>>>
> > > > > >>>>
> > > > > >>>>>>knowledge is dangerous). It is either impossible to do[/color][/color][/color]
as[color=blue][color=green]
> > the[color=darkred]
> > > > > >
> > > > > > object
> > > > > >
> > > > > >>>>doesn't
> > > > > >>>>
> > > > > >>>>
> > > > > >>>>>>support the action or I have the code wrong.
> > > > > >>>>>>
> > > > > >>>>>>I have tried looking through google through news groups,[/color]
> > there[color=darkred]
> > > > is
> > > > > >
> > > > > > a lot
> > > > > >
> > > > > >>>>>>about IMPORTING jpegs into forms but can't find anything[/color]
> > about[color=darkred]
> > > > > >
> > > > > > exporting
> > > > > >
> > > > > >>>>a
> > > > > >>>>
> > > > > >>>>
> > > > > >>>>>>form as a JPEG.
> > > > > >>>>>>
> > > > > >>>>>>The code I am using is:
> > > > > >>>>>>
> > > > > >>>>>>Function PictureTest()
> > > > > >>>>>>Dim obj As Object
> > > > > >>>>>> Set obj = Forms![frmGraph].[FirstGraph].Object
> > > > > >>>>>> obj.Export "c:\temp\PictureTest.jpeg", "jpeg"
> > > > > >>>>>> Set obj = Nothing
> > > > > >>>>>>
> > > > > >>>>>>End Function
> > > > > >>>>>>
> > > > > >>>>>>This works for each graph but not when I try :
> > > > > >>>>>>
> > > > > >>>>>>Set obj = Forms![frmGraph].Object
> > > > > >>>>>>
> > > > > >>>>>>or:
> > > > > >>>>>>
> > > > > >>>>>>Set obj = Forms![frmGraph]
> > > > > >>>>>>
> > > > > >>>>>>Any pearls of wisdom would be appreciated
> > > > > >>>>>>
> > > > > >>>>>>Regards
> > > > > >>>>>>Dave
> > > > > >>>>>>
> > > > > >>>>>>
> > > > > >>>>>
> > > > > >>>Wayne Gillespie
> > > > > >>>Gosford NSW Australia
> > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> > >[/color]
> >[/color]
>
>[/color]