I'm in an excel vba program and I need to display and create a label for a printer.
Now this printer (Zebra Z4M Plus 300 dpi) is extremely fussy and hard to use. I can now print to it if I create an image file (png or img) of dimensions 944x406 and put my desired label in an area of 797x396 in the upper left corner of that image file.
My question is about creating said image.
Some 10 years ago I remember that it was possible (in probably vb6) to use image primitives such as lines, polygons, circles and text to a picturebox control.
In Excel I have created a form and created an image control however a look at the functions and properties of this object didn't reveal any function for drawing anything on it !
(P.S. I have now found that this image object has a .picture property, this property has a .handle property and .render function, I must be close to something usable but I can't find it. It seems I could load a picture from a picture file using the LoadPicture function on this picture property)
(Perhaps there are windows api function that will let me draw on this .picture using the .picture.handle ?)
The excel Shape object also didn't have drawing primitives but it did have a .CopyPicture function that would allow me to put the contained image in the clipboard (and then I just need to find a way to save the clipboard content to an image file)
If possible I would like to draw to an object which is contained in the worksheet rather than in a userform.
I am looking for further search keywords, names of objects and function for drawing.
Thank you !