473,503 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

c# Windows Application Printing Graphics

147 New Member
Hi

I am coding a windows app in C#.

The user enters a part number, clicks the button and information about the part number is displayed on the page, including text and graphics (pictures of the part number).

I am trying to print this. I can print everything other than the graphics.

I don't even know where to start trying to print graphics. I have tried using

Expand|Select|Wrap|Line Numbers
  1. e.Graphics.DrawImage(Image.FromFile("C:\\Documents and Settings...location......images\\S05.jpg")); 
and this doesn't work (No overload for method DrawImage takes 1 argument)

If I try this
Expand|Select|Wrap|Line Numbers
  1. writer.WriteLine(System.Drawing.Image.FromFile(@"\\Server\\idc 
  2. decipher\\Resources\\S05.jpg"));
The paper in the printer just runs through without printing.

Any ideas what I should be doing?

Thanks

Dave
Jun 11 '08 #1
2 1667
Plater
7,872 Recognized Expert Expert
You really didn't even look at any of that did you?
"No overload for method DrawImage takes 1 argument"
DrawImage needs X,Y coordinates and possibly other attributes.
Why not try correcting your simple errors first, then see what happens?
Jun 11 '08 #2
Curtis Rutland
3,256 Recognized Expert Specialist
It seems that there are actually 30 overloads for that method. Do you code in Visual Studio? If you do, you should learn to use IntelliSense to your advantage. As soon as you typed the open-parenthesis after the method, the little popup box that suggests code would tell you what parameters that the method can take.



At that point you can press Up/Down or click the arrows and see all the overloads.

IntelliSense is a great way to become more familiar with the language.
Jun 11 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2128
by: Mr. B | last post by:
This is driving me NUTZ!!! I've been screwing around on this for a week now. And I have tried to find examples similar to what I have (nada). Got lots of streaming a TXT file... bah! I am...
5
3450
by: VMI | last post by:
I have a BMP image (the form is also in PDF) that contains a scanned copy of a paper form that we need to fill out. Is it possible to use this image in my application so that the application can...
0
1034
by: nest | last post by:
Im compiling on xp box but need to deploy on 98SE box. Application works great except printing, after i try to print on 98SE box it freezes completly. Code is quite standard: private void...
4
9174
by: Arif | last post by:
I C# code prints very slow as compared to a third party barcode printing software. That software prints approximately 10 labels in 2 seconds while my C# code prints 10 labels in 5 to 6 seconds. And...
0
1810
by: Nigel | last post by:
I successfully create a .NET Component (Visual Basic .NET) that would print, unfortunately when used within a web browser it appears that .NET security doesn't allow you to run code that interacts...
1
5682
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
6
3224
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument...
0
1492
by: developer200701 | last post by:
The following code (which is distilled down from a larger application) worked for several years previously. Now, the instant you click on the print icon within the print preview window the...
0
1375
by: rafiki31 | last post by:
I have been hitting walls trying to find the right way to print from a web application. Here is the thing, im implementing a webapplication for a kiosk. The kiosk has its own card printer. When i...
0
7093
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
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
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
7467
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...
1
5022
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...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
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 ...
0
399
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...

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.