Click here to Skip to main content
15,891,248 members
Home / Discussions / C#
   

C#

 
GeneralRe: Writing Assembly Attributes Programmatically Pin
Nadia Monalisa13-Apr-10 11:00
Nadia Monalisa13-Apr-10 11:00 
GeneralRe: Writing Assembly Attributes Programmatically Pin
PIEBALDconsult13-Apr-10 11:17
mvePIEBALDconsult13-Apr-10 11:17 
GeneralRe: Writing Assembly Attributes Programmatically Pin
Nadia Monalisa13-Apr-10 11:46
Nadia Monalisa13-Apr-10 11:46 
GeneralRe: Writing Assembly Attributes Programmatically Pin
Luc Pattyn13-Apr-10 13:16
sitebuilderLuc Pattyn13-Apr-10 13:16 
GeneralRe: Writing Assembly Attributes Programmatically Pin
PIEBALDconsult13-Apr-10 13:36
mvePIEBALDconsult13-Apr-10 13:36 
GeneralRe: Writing Assembly Attributes Programmatically Pin
Luc Pattyn13-Apr-10 13:41
sitebuilderLuc Pattyn13-Apr-10 13:41 
GeneralRe: Writing Assembly Attributes Programmatically Pin
PIEBALDconsult13-Apr-10 13:47
mvePIEBALDconsult13-Apr-10 13:47 
QuestionPrint images with the correct size Pin
Eagle3213-Apr-10 9:33
Eagle3213-Apr-10 9:33 
Hi,

I am currently working on printing an image from my picturebox but i am finding difficulties regarding this.

For example, I have a large image of 1024 x 768. How would i go about working out the correct size regarding the width and height
so when the image is printed, it is printed with the original width and height i.e 1024 x 768 in this example.

At the moment, i am having trouble doing this. If i do the following the image takes up all of the page(i know why) but the original
image doesnt even take up the whole page. I am using A4 piece of paper.

Here is the code:

//the width and height I will be using
 float destHeight = bitmap.Height /bitmap.VerticalResolution * 90;
 float destWidth = bitmap.Width / bitmap.HorizontalResolution * 90;


//Boundary for printable area
float highestHeight = destHeight / e.MarginBounds.Height;
float highestWidth = destWidth / e.MarginBounds.Width;


I would greatly appreciate if somebody could kindly assist me with this problem.

Thanks & Regards,
AnswerRe: Print images with the correct size Pin
Alan Balkany14-Apr-10 3:57
Alan Balkany14-Apr-10 3:57 
GeneralRe: Print images with the correct size Pin
Eagle3214-Apr-10 11:55
Eagle3214-Apr-10 11:55 
GeneralRe: Print images with the correct size Pin
Alan Balkany15-Apr-10 2:56
Alan Balkany15-Apr-10 2:56 
QuestionRunning a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 9:09
William Winner13-Apr-10 9:09 
AnswerRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 11:08
sitebuilderLuc Pattyn13-Apr-10 11:08 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 11:21
William Winner13-Apr-10 11:21 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 11:32
sitebuilderLuc Pattyn13-Apr-10 11:32 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 11:49
William Winner13-Apr-10 11:49 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 12:04
sitebuilderLuc Pattyn13-Apr-10 12:04 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment [modified] Pin
William Winner13-Apr-10 12:15
William Winner13-Apr-10 12:15 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 13:04
sitebuilderLuc Pattyn13-Apr-10 13:04 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 13:18
William Winner13-Apr-10 13:18 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn13-Apr-10 13:34
sitebuilderLuc Pattyn13-Apr-10 13:34 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner16-Apr-10 10:12
William Winner16-Apr-10 10:12 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
Luc Pattyn16-Apr-10 10:26
sitebuilderLuc Pattyn16-Apr-10 10:26 
GeneralRe: Running a BackgroundWorker in a Single Threaded Apartment Pin
William Winner13-Apr-10 11:50
William Winner13-Apr-10 11:50 
QuestionKernelbase error on Server 2008 Pin
Paladin200013-Apr-10 9:05
Paladin200013-Apr-10 9:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.