View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Save VB Userform Frame1 as Image?

Todd,
The easy way is to use Windows functionality of pressing ALT+PRINTSCREEN,
than paste into a graphics app.

Otherwise, as most of the controls on a VBA userform are windowless (they do
not have a handle, HWnd), I would imagine you have get the coordination of
the frame, translate them to pixels and using the Hwnd of the underlying
form call some API functions.
Then save the resulting memory DC as a bmp or jpg.
Doable, but not simple.

NickHK

wrote in message
ups.com...
Hello fellow programmers!

I am in need of some code to get VB to understand that it is suppose
to save the contents of whatever is in UserForm1 Frame1 as an image
(*.jpg)...I've seen this done with charts & graphs but was wondering
if this is possible with frames? Any help is much appreciated! Thanks!

-Todd