473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Saving picturebox usercontrols

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--
Jul 17 '05 #1
1 2257
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 passed as the hwnd of interest. It should work if you
instead pass 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" <ka**@curio.com> wrote in message
news:2c**************************@posting.google.c 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--
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Carl | last post by:
In the application I'm writing, I'm modifying a windows bitmap using the circle and line methods. Once the changes have been made, I would like to save the bitmap with the changes. My problem is,...
1
by: Dev | last post by:
Dear Friends, I am passing the image name, size (in bytes) and imgaeformat (like jpg or bmp or pdf) through the network. I want display the image into picturebox without saving image...
5
by: Steve Marshall | last post by:
Hi all, I am converting an app which used a picturebox to draw graphs etc onto, then saved them to a file. I can certainly draw things onto a picturbox in VB.NET, but how do I save them to a...
1
Sl1ver
by: Sl1ver | last post by:
i've got this piece of coding. i need help with opening a picture box and then saving it as OLE Object in access DB How would i massage this code tho fit in? try { //save image to byte...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.