Click here to Skip to main content
15,909,953 members
Home / Discussions / C#
   

C#

 
QuestionProblem loading assembly from byte[] Pin
Helfdane21-Apr-09 0:03
Helfdane21-Apr-09 0:03 
AnswerRe: Problem loading assembly from byte[] Pin
Rob Philpott21-Apr-09 3:41
Rob Philpott21-Apr-09 3:41 
GeneralRe: Problem loading assembly from byte[] Pin
Helfdane21-Apr-09 3:53
Helfdane21-Apr-09 3:53 
Questionalternative to session use Pin
mudag21-Apr-09 0:00
mudag21-Apr-09 0:00 
AnswerRe: alternative to session use Pin
Le centriste21-Apr-09 1:15
Le centriste21-Apr-09 1:15 
GeneralRe: alternative to session use Pin
Ian McCaul21-Apr-09 4:48
Ian McCaul21-Apr-09 4:48 
GeneralRe: alternative to session use Pin
Le centriste21-Apr-09 5:44
Le centriste21-Apr-09 5:44 
Questionplaying multiple video files using axWindowMediaplayer tool !!! Pin
mist_psycho20-Apr-09 23:19
mist_psycho20-Apr-09 23:19 
AnswerRe: playing multiple video files using axWindowMediaplayer tool !!! Pin
Roman Lerman20-Apr-09 23:57
Roman Lerman20-Apr-09 23:57 
Questioncanvas.Focus does not unfocus textbox Pin
Pauwels Bart20-Apr-09 21:51
Pauwels Bart20-Apr-09 21:51 
AnswerRe: canvas.Focus does not unfocus textbox Pin
Roman Lerman20-Apr-09 22:35
Roman Lerman20-Apr-09 22:35 
GeneralRe: canvas.Focus does not unfocus textbox Pin
Pauwels Bart20-Apr-09 22:51
Pauwels Bart20-Apr-09 22:51 
Questionwhat does this error mean Pin
benson.misi20-Apr-09 21:47
benson.misi20-Apr-09 21:47 
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 
I have a program which has a control that gets live web cam video feed and plays it on a rectangle in the main form. I have the following code for the control "Mouse_Click" event:

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


i need to convert the e.X and e.Y to integer format, and use those values in the getPixel function of the bitmap image taken from the video source player in the following code:

private void videoSourcePlayer_NewFrame( object sender, ref Bitmap image )
       {


               bool showOnlyObjects = onlyObjectsCheck.Checked;

               Bitmap objectsImage = null;



                   objectsImage = image;
                   colorFilter.ApplyInPlace( image );


               // lock image for further processing
               BitmapData objectsData = objectsImage.LockBits( new Rectangle( 0, 0, image.Width, image.Height ),
                   ImageLockMode.ReadOnly, image.PixelFormat );

               // grayscaling
               UnmanagedImage grayImage = grayscaleFilter.Apply( new UnmanagedImage( objectsData ) );

               // unlock image
               objectsImage.UnlockBits( objectsData );

               // locate blobs
               blobCounter.ProcessImage( grayImage );
               Rectangle[] rects = blobCounter.GetObjectRectangles( );

               if ( rects.Length > 0 )
               {


                   Rectangle objectRect = rects[0];

                   Graphics g = Graphics.FromImage( image );

                   using ( Pen pen = new Pen( Color.FromArgb( 160, 255, 160 ), 3 ) )
                   {
                       //draw something here
                   }

                   g.Dispose( );


               }
            }


how do i get the mouse x and y coordinate values from the first function into the second function so i can use the "image.getPixel()" call?
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 
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 

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.