Click here to Skip to main content
15,892,161 members
Home / Discussions / C#
   

C#

 
AnswerRe: what does this error mean Pin
Pete O'Hanlon20-Apr-09 21:51
mvePete O'Hanlon20-Apr-09 21:51 
GeneralRe: what does this error mean Pin
CPallini21-Apr-09 2:11
mveCPallini21-Apr-09 2:11 
GeneralRe: what does this error mean Pin
Pete O'Hanlon21-Apr-09 2:24
mvePete O'Hanlon21-Apr-09 2:24 
AnswerRe: what does this error mean Pin
N a v a n e e t h20-Apr-09 21:52
N a v a n e e t h20-Apr-09 21:52 
QuestionHow to import following C DLL function to C# ? [ I am still waiting .... :( ] [Wating no more :)] Pin
Roman Lerman20-Apr-09 20:53
Roman Lerman20-Apr-09 20:53 
AnswerRe: How to import following C DLL function to C# ? [ I am still waiting .... :( ] Pin
Henry Minute21-Apr-09 1:23
Henry Minute21-Apr-09 1:23 
QuestionHow to get color of pixel at mouse click in live video control Pin
sebogawa20-Apr-09 20:33
sebogawa20-Apr-09 20:33 
AnswerRe: How to get color of pixel at mouse click in live video control Pin
Henry Minute21-Apr-09 1:42
Henry Minute21-Apr-09 1:42 
sebogawa wrote:
how do i get the mouse x and y coordinate values from the first function into the second function


Short answer, you can't!

Judging from its signature, your videoSourcePlayer_NewFrame method is an event handler for the video player you are using. Its parameters are fixed and interfering with then will break the code.

One possible solution is to make the UnmanagedImage grayImage declaration a class field (Move the declaration outside the handler), then in your MouseClick handler do something like

private void videoSourcePlayer_MouseClick(object sender, MouseEventArgs e)
{
    txtMouseX.Text = e.X.ToString();
    txtMouseY.Text = e.Y.ToString();

    // Either
        Color selectedColor = grayImage.GetPixel(e.X, e.Y);
        // do stuff with selectedColor here
    // OR
        SomeMethodThatUsesTheColor(grayImage.GetPixel(e.X, e.Y));
}


Your biggest problem might turn out to depend on how quickly the grayImage changes.

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

QuestionRe: How to get color of pixel at mouse click in live video control [modified] Pin
sebogawa21-Apr-09 8:46
sebogawa21-Apr-09 8:46 
QuestionConcurrency violation: the UpdateCommand affected 0 of the expected 1 records [Very Emergency] Pin
hdv21220-Apr-09 19:34
hdv21220-Apr-09 19:34 
AnswerRe: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records [Very Emergency] Pin
Roman Lerman20-Apr-09 22:47
Roman Lerman20-Apr-09 22:47 
GeneralRe: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records [Very Emergency] Pin
hdv21220-Apr-09 23:55
hdv21220-Apr-09 23:55 
GeneralRe: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records [Very Emergency] Pin
Roman Lerman21-Apr-09 0:37
Roman Lerman21-Apr-09 0:37 
GeneralRe: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records [Very Emergency] Pin
hdv21221-Apr-09 1:10
hdv21221-Apr-09 1:10 
AnswerRe: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records [Very Emergency] Pin
Roman Lerman21-Apr-09 1:22
Roman Lerman21-Apr-09 1:22 
GeneralRe: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records [Very Emergency] Pin
hdv21221-Apr-09 2:34
hdv21221-Apr-09 2:34 
GeneralRe: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records [Very Emergency] Pin
Roman Lerman21-Apr-09 2:44
Roman Lerman21-Apr-09 2:44 
GeneralRe: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records [Very Emergency] Pin
hdv21221-Apr-09 3:05
hdv21221-Apr-09 3:05 
QuestionHow to convert (string -> xml) with window mobile Pin
YochangSong20-Apr-09 18:34
YochangSong20-Apr-09 18:34 
AnswerRe: How to convert (string -> xml) with window mobile Pin
N a v a n e e t h20-Apr-09 19:55
N a v a n e e t h20-Apr-09 19:55 
Questionplugin error Pin
Ch.Gayatri Subudhi20-Apr-09 18:24
Ch.Gayatri Subudhi20-Apr-09 18:24 
QuestionTab Control Pin
Piyush Vaishnav20-Apr-09 17:36
Piyush Vaishnav20-Apr-09 17:36 
AnswerRe: Tab Control Pin
Christian Graus20-Apr-09 17:46
protectorChristian Graus20-Apr-09 17:46 
QuestionAccessing webcam.. Pin
Jacob Dixon20-Apr-09 17:16
Jacob Dixon20-Apr-09 17:16 
AnswerRe: Accessing webcam.. Pin
Christian Graus20-Apr-09 17:36
protectorChristian Graus20-Apr-09 17:36 

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.