Click here to Skip to main content
15,912,507 members
Home / Discussions / C#
   

C#

 
QuestionUnhandled Null Exception error looping through DataGridView Pin
Wheels01211-Aug-09 9:03
Wheels01211-Aug-09 9:03 
AnswerRe: Unhandled Null Exception error looping through DataGridView Pin
0x3c011-Aug-09 9:27
0x3c011-Aug-09 9:27 
GeneralRe: Unhandled Null Exception error looping through DataGridView Pin
Wheels01211-Aug-09 9:33
Wheels01211-Aug-09 9:33 
QuestionProblem with running C# application using ZedGraph Pin
TamasK911-Aug-09 9:02
TamasK911-Aug-09 9:02 
AnswerRe: Problem with running C# application using ZedGraph Pin
Member 360949112-Aug-09 14:35
Member 360949112-Aug-09 14:35 
QuestionPosition of a bitmap into a PictureBox Pin
Mirshinni11-Aug-09 8:36
Mirshinni11-Aug-09 8:36 
AnswerRe: Position of a bitmap into a PictureBox Pin
Henry Minute11-Aug-09 8:46
Henry Minute11-Aug-09 8:46 
GeneralRe: Position of a bitmap into a PictureBox Pin
Mirshinni11-Aug-09 9:36
Mirshinni11-Aug-09 9:36 
That really sounds complicated but I understand you perfectly. Actually I made a proof project and this is the code:

pictureBox1.Image = new Bitmap(pictureBox1.Width, pictureBox1.Height);
Bitmap OrigImage = new Bitmap(pictureBox2.Image);
int targetTop = pictureBox1.Height - OrigImage.Height;
int targetLeft = 0;
int targetWidth = pictureBox1.Width;
int targetHeight = pictureBox1.Height;
int sourceWidth = pictureBox1.Width;
int sourceHeight = pictureBox1.Height;

Graphics g = Graphics.FromImage(pictureBox1.Image);
            
g.DrawImage(OrigImage,new Rectangle(targetLeft, targetTop, targetWidth, targetHeight),new Rectangle(0,0, sourceWidth, sourceHeight),GraphicsUnit.Pixel);




It worked prefectly. That's exactly what I wanted.

Thanks a lot Thumbs Up | :thumbsup:
GeneralRe: Position of a bitmap into a PictureBox Pin
Henry Minute11-Aug-09 10:21
Henry Minute11-Aug-09 10:21 
AnswerRe: Position of a bitmap into a PictureBox Pin
Luc Pattyn11-Aug-09 22:58
sitebuilderLuc Pattyn11-Aug-09 22:58 
Questionc# vs2008 Reportviewer is not closing the database [modified] Pin
dyohanan11-Aug-09 8:17
dyohanan11-Aug-09 8:17 
QuestionProperly linking inter-dependent libraries Pin
Mike Marynowski11-Aug-09 6:58
professionalMike Marynowski11-Aug-09 6:58 
AnswerRe: Properly linking inter-dependent libraries Pin
Scott Dorman11-Aug-09 7:21
professionalScott Dorman11-Aug-09 7:21 
GeneralRe: Properly linking inter-dependent libraries Pin
Mike Marynowski11-Aug-09 7:28
professionalMike Marynowski11-Aug-09 7:28 
GeneralRe: Properly linking inter-dependent libraries Pin
Scott Dorman11-Aug-09 7:43
professionalScott Dorman11-Aug-09 7:43 
GeneralRe: Properly linking inter-dependent libraries Pin
Mike Marynowski11-Aug-09 7:53
professionalMike Marynowski11-Aug-09 7:53 
Questiondatagridview row back color Pin
prubyholl11-Aug-09 6:40
professionalprubyholl11-Aug-09 6:40 
AnswerRe: datagridview row back color Pin
dan!sh 11-Aug-09 6:57
professional dan!sh 11-Aug-09 6:57 
GeneralRe: datagridview row back color Pin
prubyholl11-Aug-09 7:05
professionalprubyholl11-Aug-09 7:05 
QuestionPrint (some column) of data grid view Pin
Samb198511-Aug-09 5:52
Samb198511-Aug-09 5:52 
AnswerRe: Print (some column) of data grid view Pin
Muhammad Mazhar11-Aug-09 6:07
Muhammad Mazhar11-Aug-09 6:07 
AnswerRe: Print (some column) of data grid view Pin
Mycroft Holmes11-Aug-09 14:22
professionalMycroft Holmes11-Aug-09 14:22 
GeneralRe: Print (some column) of data grid view Pin
Samb198518-Aug-09 5:46
Samb198518-Aug-09 5:46 
QuestionDataGridView navigating to Child Rows Pin
codeboy198811-Aug-09 5:09
codeboy198811-Aug-09 5:09 
QuestionAddInCustomAction not working properly Pin
lune1211-Aug-09 4:30
lune1211-Aug-09 4:30 

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.