Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8806743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:12:05+00:00 2026-06-14T02:12:05+00:00

I try to get the Heu value from where i click on an image,

  • 0

I try to get the Heu value from where i click on an image, however I am doing something wrong and i am not sure what it is, it has to do with the designer file and how i call the function _mousedown of the image.

in my main.designer.cs file i have:

// pictureBox1
// 
this.pictureBox1.Location = new System.Drawing.Point(146, 30);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(640, 480);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;

//line below is not accepted ??  

this.pictureBox1.MouseDown += new System.EventHandler(this.pictureBox1_MouseDown); 

in my main program i have :

private void pictureBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
    {
        System.Drawing.Point Cursor = new System.Drawing.Point(e.X, e.Y);
        Color pixel = myImage.GetPixel(Cursor.X, Cursor.Y);
        textBoxH.Text =pixel.GetHue().ToString();
     }

The error i get is :

*’System.Windows.Forms.PictureBox’ does not contain a definition for ‘pictureBox1_MouseDown’ and no extension method ‘pictureBox1_MouseDown’ accepting a first argument of type ‘System.Windows.Forms.PictureBox’ could be found

are you missing a using directive or an assembly reference?)

C:\projects\visual studio 2010\Projects\image\Main.Designer.cs**

Note i have included using System; above in my main program.

*UPDATE *
After compile i now get a different error (have not changed the code)

Error 1 No overload for ‘pictureBox1_MouseDown’ matches delegate ‘System.EventHandler’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:12:07+00:00Added an answer on June 14, 2026 at 2:12 am

    Looks to my like you hand coded a change to your designer file. If you did, stop doing that: designer generated code should not be touched as VS will screw with it.

    Regardless, that’s not the right definition for a mouse down event.

    The following:

    this.pictureBox1.MouseDown += new System.EventHandler(this.pictureBox1_MouseDown);
    

    should be:

    this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to get to a page straight from Bash at http://www.ocwconsortium.org/ . The
I why can't I return the image I get from the url from within
I've run into an issue which I'm not sure if I can get round
I have a function in Jquery, that try get html from an page: $.ajax({
I try get a my attribute inside Fancybox, and I get when I use
i try to get my FragmentPagerAdapter working, but the examples are a bit to
I try to get the whole content between an opening xml tag and it's
I try to get the main window handle using following code in Lazarus (Free
I try to get some website attribute (colour of the cell) and compare in
I try to get all WPF window controls collections. In other words i try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.