Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
Questioncount words Pin
eyalso4-May-06 23:41
eyalso4-May-06 23:41 
AnswerRe: count words Pin
alexey N4-May-06 23:50
alexey N4-May-06 23:50 
GeneralRe: count words Pin
eyalso5-May-06 0:00
eyalso5-May-06 0:00 
GeneralRe: count words Pin
alexey N5-May-06 0:22
alexey N5-May-06 0:22 
QuestionChanging Colors Pin
Greeky4-May-06 22:54
Greeky4-May-06 22:54 
AnswerRe: Changing Colors Pin
jeyapandian4-May-06 23:02
jeyapandian4-May-06 23:02 
AnswerRe: Changing Colors Pin
Robert Rohde4-May-06 23:09
Robert Rohde4-May-06 23:09 
GeneralRe: Changing Colors Pin
Greeky5-May-06 0:01
Greeky5-May-06 0:01 
thank you
I found this sample so GetPixel and SetPixel is ok for me.
My new question is
my picture box is set to Strech view.
My image's width =768 , height=503
but on secreen, rightbottom corner pixel coordinat is x:460 y:261
So when i want to show color where mouse on over, it shows another color because of wrong coordinats. might i convert to coordinats?

Bitmap bitmap = new Bitmap("C:\\TV2.bmp");<br />
int width = bitmap.Width;<br />
int height = bitmap.Height;<br />
<br />
int i, j;<br />
for (i = 0; i< width; i++) <br />
{<br />
  for (j=0; j<height; j++)<br />
  {<br />
     Color pixelColor = bitmap.GetPixel(i, j);<br />
     int r = pixelColor.R; // the Red component<br />
     int b = pixelColor.B; // the Blue component<br />
     Color newColor = Color.FromArgb(r, 0, b);<br />
     bitmap.SetPixel(i, j, newColor);<br />
    }<br />
}<br />
this.BackgroundImage = bitmap;


-- modified at 6:03 Friday 5th May, 2006
GeneralRe: Changing Colors Pin
Robert Rohde5-May-06 1:46
Robert Rohde5-May-06 1:46 
AnswerRe: Changing Colors Pin
Insincere Dave5-May-06 6:16
Insincere Dave5-May-06 6:16 
QuestionFind the occurance of specific string in all files in specified directory. Pin
Chetan Ranpariya4-May-06 22:46
Chetan Ranpariya4-May-06 22:46 
AnswerRe: Find the occurance of specific string in all files in specified directory. Pin
Robert Rohde4-May-06 23:40
Robert Rohde4-May-06 23:40 
Questionencryption in asp.net Pin
V.thakur4-May-06 21:59
V.thakur4-May-06 21:59 
AnswerRe: encryption in asp.net Pin
Guffa4-May-06 22:27
Guffa4-May-06 22:27 
Questionwhat are the methods,classes are use for login page for security purpose Pin
chaitanyapissay4-May-06 21:25
chaitanyapissay4-May-06 21:25 
QuestionCurrentRowIndex Pin
Rmokkenstorm4-May-06 21:04
Rmokkenstorm4-May-06 21:04 
AnswerRe: CurrentRowIndex Pin
jeyapandian4-May-06 22:22
jeyapandian4-May-06 22:22 
GeneralRe: CurrentRowIndex Pin
Rmokkenstorm4-May-06 22:34
Rmokkenstorm4-May-06 22:34 
GeneralRe: CurrentRowIndex Pin
jeyapandian4-May-06 22:46
jeyapandian4-May-06 22:46 
GeneralRe: CurrentRowIndex Pin
Rmokkenstorm4-May-06 22:55
Rmokkenstorm4-May-06 22:55 
GeneralRe: CurrentRowIndex Pin
jeyapandian4-May-06 23:00
jeyapandian4-May-06 23:00 
GeneralRe: CurrentRowIndex Pin
Rmokkenstorm4-May-06 23:36
Rmokkenstorm4-May-06 23:36 
AnswerRe: CurrentRowIndex Pin
m.rastgar5-May-06 1:12
m.rastgar5-May-06 1:12 
QuestionRaising Event from one application to another Pin
Shajeel4-May-06 20:56
Shajeel4-May-06 20:56 
AnswerRe: Raising Event from one application to another Pin
alexey N4-May-06 22:25
alexey N4-May-06 22:25 

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.