PaulBarter
MIS
I am writing a Function to draw an image on a printer page. To make it general I don't have reference to any forms, controls etc.
e.g. Function starts
Public Function InsertImage(pOutput as Object, pImage as String, pX as double, pY as double, pWidth as double) as Boolean
which will insert image file into the output at (pX,pY) with a specified width (maintaining aspect ratio)
Is it possible to create a PicureBox in memory so I can do LoadPicture from the supplied filename, and then use PaintPicture to insert it into my print.
I can define it e.g.
Dim picPicture as PictureBox
but not sure how to create it - CreateObject?
I could of course Load a temporary form with a PictureBox on it and then unload it afterwards, but that seems a bit clumsy.
I'm sure this must be simple, but can't think how!
e.g. Function starts
Public Function InsertImage(pOutput as Object, pImage as String, pX as double, pY as double, pWidth as double) as Boolean
which will insert image file into the output at (pX,pY) with a specified width (maintaining aspect ratio)
Is it possible to create a PicureBox in memory so I can do LoadPicture from the supplied filename, and then use PaintPicture to insert it into my print.
I can define it e.g.
Dim picPicture as PictureBox
but not sure how to create it - CreateObject?
I could of course Load a temporary form with a PictureBox on it and then unload it afterwards, but that seems a bit clumsy.
I'm sure this must be simple, but can't think how!