Click here to Skip to main content
15,888,340 members
Home / Discussions / C#
   

C#

 
QuestionTracing Invalidate calls (Windows Forms) Pin
Jon Hulatt31-Aug-08 22:58
Jon Hulatt31-Aug-08 22:58 
AnswerRe: Tracing Invalidate calls (Windows Forms) Pin
Frank Horn31-Aug-08 23:58
Frank Horn31-Aug-08 23:58 
AnswerRe: Tracing Invalidate calls (Windows Forms) Pin
leppie1-Sep-08 2:11
leppie1-Sep-08 2:11 
GeneralRe: Tracing Invalidate calls (Windows Forms) Pin
Jon Hulatt1-Sep-08 2:15
Jon Hulatt1-Sep-08 2:15 
QuestionHow do I draw a single color transparently? Pin
Megidolaon31-Aug-08 22:47
Megidolaon31-Aug-08 22:47 
AnswerRe: How do I draw a single color transparently? Pin
oobimoo31-Aug-08 23:29
oobimoo31-Aug-08 23:29 
GeneralRe: How do I draw a single color transparently? Pin
Megidolaon1-Sep-08 22:56
Megidolaon1-Sep-08 22:56 
QuestionDrawing a big image to real coordinates Pin
ianhunt0131-Aug-08 22:39
ianhunt0131-Aug-08 22:39 
Hi,

I have got a big topographical jpg file that I want to display in a form on a picturebox in its real coordinates that ranges X from 50 000 to 75 000 and Y from 2 800 000 to 2 825 000. this will make it very easy for me to get the mouse coords in real coords as the user invokes the Mousedown event. It will also make it easier for me to draw real features in its real coordinates.

I have got the code:

Image image = Image.FromFile(@"C:\Images\2529DA.jpg");
Pen myPen = new Pen(Color.Black);         
Graphics formGraphics = this.picGrid.CreateGraphics();
formGraphics.Clear(picGrid.BackColor);

formGraphics.DrawImage(image, 0, 0, 1000, 1000);


This shows the topomap nicely on the screen but with the local picturebox coords from 0 to 1000. If I change the code to

formGraphics.DrawImage(image, 50000, 2800000, 25000, 25000);


This previous code then puts the map WAY offscreen to the south-east !

I tried fiddling with the following code but no luck.

formGraphics.DrawImageUnscaled(image,0, 0);
formGraphics.DrawImageUnscaledAndClipped(image, rect1);


please help !

cheers

Ian
AnswerRe: Drawing a big image to real coordinates Pin
oobimoo1-Sep-08 0:18
oobimoo1-Sep-08 0:18 
GeneralRe: Drawing a big image to real coordinates Pin
ianhunt011-Sep-08 1:03
ianhunt011-Sep-08 1:03 
GeneralRe: Drawing a big image to real coordinates Pin
oobimoo1-Sep-08 8:19
oobimoo1-Sep-08 8:19 
GeneralRe: Drawing a big image to real coordinates Pin
ianhunt012-Sep-08 5:49
ianhunt012-Sep-08 5:49 
QuestionFather class how to use the special sub-category type [modified] Pin
huangrongchuan31-Aug-08 21:43
huangrongchuan31-Aug-08 21:43 
GeneralRe: Father class in how to use the special sub-category of type Pin
Guffa1-Sep-08 1:42
Guffa1-Sep-08 1:42 
GeneralRe: Father class in how to use the special sub-category of type Pin
huangrongchuan1-Sep-08 2:29
huangrongchuan1-Sep-08 2:29 
AnswerRe: Father class how to use the special sub-category type Pin
Guffa1-Sep-08 6:38
Guffa1-Sep-08 6:38 
GeneralRe: Father class how to use the special sub-category type [modified] Pin
huangrongchuan1-Sep-08 15:45
huangrongchuan1-Sep-08 15:45 
QuestionHow to transfer all mails from one account to another. Pin
ekpravasi31-Aug-08 20:18
ekpravasi31-Aug-08 20:18 
AnswerRe: How to transfer all mails from one account to another. Pin
Harvey Saayman31-Aug-08 20:41
Harvey Saayman31-Aug-08 20:41 
AnswerRe: How to transfer all mails from one account to another. Pin
ekpravasi31-Aug-08 21:13
ekpravasi31-Aug-08 21:13 
QuestionDevice ID Pin
ellllllllie31-Aug-08 20:16
ellllllllie31-Aug-08 20:16 
AnswerRe: Device ID Pin
Brij31-Aug-08 20:33
mentorBrij31-Aug-08 20:33 
GeneralRe: Device ID Pin
ellllllllie31-Aug-08 23:45
ellllllllie31-Aug-08 23:45 
QuestionHow to get commandline parameter from User Pin
Laji5931-Aug-08 17:35
Laji5931-Aug-08 17:35 
AnswerRe: How to get commandline parameter from User Pin
Vikram A Punathambekar31-Aug-08 18:34
Vikram A Punathambekar31-Aug-08 18:34 

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.