473,804 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4446
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.Ima ge

--
Mike

Mike McIntyre [MVP]
http://www.getdotnetcode.com
"Christie" <c.*******@yaho o.comwrote in message
news:11******** *************@m 79g2000cwm.goog legroups.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****@getdotn etcode.comschri eb:
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.Ima ge
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
12130
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 in a page with my other printer.print statements.. is that possible ?
2
3392
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 images loaded into its picture box space and so I thought it would be a matter of copying the graph object to the clipboard and then casting its Metafile format to a bitmap which I could then use to fill the picturebox. Not so, although during...
16
9380
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
1237
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
1429
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 PictureBox_MapEditor_Map.CreateGraphics.DrawImage (System.Drawing.Image.FromFile("C:\The RPG Project\Test 2.bmp"), A * 40, B * 40) Next Next
0
4134
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 is large and during printing visible area of the screen print ok but the form area which is invisible showing in black. can u suggest some ideas for the same. If u have any solution plz give me logic or code at kishoremungel@yahoo.com regards kishor
24
2847
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 with the printer that i am printing to(Zebra TLP2844). When i open Word and look at the fonts available for the default printer, it does not show the fonts i want. If i cahnge the printer to the printer that
0
1805
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 pictureBox is far away from the panel.any help
2
2356
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 PictureBox, and than just print it ... I think this should be a very very simple thing,
0
9595
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10353
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10099
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3003
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.