Click here to Skip to main content
15,899,825 members
Home / Discussions / C#
   

C#

 
Questionanybody knows how to create xml attribute such this? [modified] Pin
lindaRahamad15-May-07 5:14
lindaRahamad15-May-07 5:14 
AnswerRe: anybody knows how to create xml attribute such this? Pin
PIEBALDconsult15-May-07 7:26
mvePIEBALDconsult15-May-07 7:26 
QuestionExchange 2003 and SMTP Mail Pin
Saamir15-May-07 5:00
Saamir15-May-07 5:00 
Questionstring reference type Pin
Rahul8315-May-07 4:52
Rahul8315-May-07 4:52 
AnswerRe: string reference type Pin
Martin#15-May-07 4:59
Martin#15-May-07 4:59 
AnswerRe: string reference type Pin
Arun.Immanuel15-May-07 5:44
Arun.Immanuel15-May-07 5:44 
GeneralRe: string reference type Pin
Rahul8315-May-07 17:48
Rahul8315-May-07 17:48 
QuestionCropping an Image Pin
Gareth H15-May-07 4:27
Gareth H15-May-07 4:27 
Hi,

Im trying to print out an image, but if it doesnt fit onto one page, i cut it up and place what evers left onto the next page.

//Draw current image to screen - image = the original image<br />
Bitmap tempImage = new Bitmap(image, tempSize);<br />
RectangleF origRects = new RectangleF(0, 0, image.Width, image.Height);<br />
e.Graphics.DrawImage(tempImage, tempRect, origRects, GraphicsUnit.Pixel);<br />
<br />
if (tempImage.Height >= e.MarginBounds.Bottom)<br />
  {<br />
  //how much of the image hasnt been drawn<br />
  int newHieght = tempImage.Height - e.MarginBounds.Bottom;<br />
<br />
  tempRect = new RectangleF(0, newHieght, tempRect.Width, newHieght);<br />
  tempSize = new Size((int)tempRect.Width, (int)tempRect.Height);<br />
<br />
  e.HasMorePages = true;<br />
  return;<br />
}<br />
<br />
e.HasMorePages = false;


The problem is that i draw the first page fine, but the second page, the image is the correct height, but instead of drawing the bottom half, it draws the top half of the image and cuts of what should be drawn.

Obviously, the cords are wrong, but what do i need to change?

regards,
Gareth.
AnswerRe: Cropping an Image Pin
Judah Gabriel Himango15-May-07 7:18
sponsorJudah Gabriel Himango15-May-07 7:18 
Questionstring data type Pin
Rahul8315-May-07 4:15
Rahul8315-May-07 4:15 
AnswerRe: string data type Pin
Guffa15-May-07 4:30
Guffa15-May-07 4:30 
AnswerRe: string data type Pin
Judah Gabriel Himango15-May-07 4:30
sponsorJudah Gabriel Himango15-May-07 4:30 
QuestionConvert Word .doc to PDF without automating Word?? Pin
joker79715-May-07 4:11
joker79715-May-07 4:11 
QuestionStystem.Int32 and Object Pin
Rahul8315-May-07 4:09
Rahul8315-May-07 4:09 
AnswerRe: Stystem.Int32 and Object Pin
Judah Gabriel Himango15-May-07 4:26
sponsorJudah Gabriel Himango15-May-07 4:26 
QuestionClickOnce Deployment Error Pin
pashitech15-May-07 3:30
pashitech15-May-07 3:30 
AnswerRe: ClickOnce Deployment Error Pin
Judah Gabriel Himango15-May-07 4:25
sponsorJudah Gabriel Himango15-May-07 4:25 
GeneralRe: ClickOnce Deployment Error Pin
pashitech15-May-07 5:03
pashitech15-May-07 5:03 
GeneralRe: ClickOnce Deployment Error Pin
Judah Gabriel Himango15-May-07 7:16
sponsorJudah Gabriel Himango15-May-07 7:16 
GeneralRe: ClickOnce Deployment Error Pin
Judah Gabriel Himango16-May-07 4:32
sponsorJudah Gabriel Himango16-May-07 4:32 
GeneralRe: ClickOnce Deployment Error Pin
Judah Gabriel Himango16-May-07 4:33
sponsorJudah Gabriel Himango16-May-07 4:33 
GeneralRe: ClickOnce Deployment Error Pin
Judah Gabriel Himango16-May-07 4:39
sponsorJudah Gabriel Himango16-May-07 4:39 
GeneralRe: ClickOnce Deployment Error Pin
pashitech16-May-07 5:21
pashitech16-May-07 5:21 
GeneralRe: ClickOnce Deployment Error Pin
Judah Gabriel Himango16-May-07 5:40
sponsorJudah Gabriel Himango16-May-07 5:40 
QuestionWriting with WriteProcessMemory Pin
Webtijn15-May-07 3:22
Webtijn15-May-07 3:22 

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.