473,395 Members | 1,343 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,395 software developers and data experts.

Print contents of picturebox

In my application, lines (shapes such as circles) and text are drawn in
a picturebox. I am struggling to find a way to print the text and
shapes. There is no images in the picturebox. Could someone please
show me the way.

I am using Visual Studio 2005 (VB.Net)
Operating System: XP Pro

Thanks

Sep 2 '06 #1
2 4417
If you are drawing to a PictureBox as you state, you can access the
PictureBox's image via its Image property:

Dim theImage As Image = PictureBox1.Image

--
Mike

Mike McIntyre [MVP]
http://www.getdotnetcode.com
"Christie" <c.*******@yahoo.comwrote in message
news:11*********************@m79g2000cwm.googlegro ups.com...
In my application, lines (shapes such as circles) and text are drawn in
a picturebox. I am struggling to find a way to print the text and
shapes. There is no images in the picturebox. Could someone please
show me the way.

I am using Visual Studio 2005 (VB.Net)
Operating System: XP Pro

Thanks

Sep 4 '06 #2
"Mike McIntyre" <mi****@getdotnetcode.comschrieb:
If you are drawing to a PictureBox as you state, you can access the
PictureBox's image via its Image property:

Dim theImage As Image = PictureBox1.Image
This will only work if you assigned the image to the picturebox previously,
but it will fail if you painted onto the picturebox in its 'Paint' event
handler, for example.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Sep 4 '06 #3

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

Similar topics

6
by: Mario | last post by:
I could you print jpg or bmp from the printer commands I tried something like ; Printer.picturepaint ("92.bmp") printer.enddoc Doesn't work.. I want to be able to print a logo or a picture...
2
by: andrew | last post by:
I have an application that requires graphical output. I have added a MSChart to the application and want to be able to print this out. I have a form which allows me to print, and zoom in etc for...
16
by: Neal | last post by:
Hi, I saw the VB6 Code to do this at this link: http://www.dotnet247.com/247reference/msgs/11/56581.aspx The VB6 Code reads as follows: Private Type Rect Left As Long
2
by: Daniel | last post by:
Hi all, Is it possible to output the contents of a panel as a graphic file? -- Daniel MCSE, MCP+I, MCP in Windows 2000/NT --------------------------------------
1
by: The Confessor | last post by:
(ellipses in place of code sections which do not deviate from defaults) Private Sub Form_Main_Load(...) Handles MyBase.Load For A = 0 To 16 For B = 0 To 14...
0
by: mungelwar | last post by:
Hi friend, I need to print picturebox or form in vb6, which contain other controls & user controls. I used several methods like capture screen or printform method but the form size which i m using...
24
by: Tony Girgenti | last post by:
Hello. Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a windows XP Pro, SP2. Before printing a document, i want to set the font to a font that is only available...
0
by: kaymaf | last post by:
Hi , i wrote an application to make ID Card, i used textbox, label and picturebox on a panel. i want to print the panel and the control on it but when i preview the document, the image on the...
2
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all I have some problems with printing in C#. I just want to have something like a report with one TextBox on top and a PictureBox below. While runtime, I need to fill the TextBox and the...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.