You may be able to modify the code at
http://www.mvps.org/vbnet/code/image...metafileps.htm to take a
snapshot of the usercontrol. This demo does the screen because
GetDesktopWindow() is p***ed as the hwnd of interest. It should work if you
instead p*** the hwnd of the usercontrol.
--
Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.
"Kate" <EMAIL REMOVED> wrote in message
news:EMAIL REMOVED om...
: Hi:
:
: I have a picturebox control, and at runtime various usercontrols are
: added to it to make a diagram. As dynamically added usercontrols, they
: are of type VBExtender.
:
: Is there a way to save the diagram as a .wmf file? (The diagram might
: extend beyond the confines of the actual picturebox on the screen.)
:
: I have seen examples of how to print all the controls in a picturebox
: (using the sendmessage function), but my usercontrols don't print
: using this method. I'm wondering if there is something I can do so
: that they are counted as being "owned" or "children" or in the
: "clientarea" of the picturebox (the wparam for that sendmessage
: function), and if doing so will also enable me to save the diagram as
: well as print it.
:
: *in case it makes a difference, the usercontrols themselves are
: transparent and not windowless--their "appearance" is as shapes drawn
: on them when they are created.
:
: Thanks in advance for any ideas--