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 4622800
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:53:41+00:00 2026-05-22T02:53:41+00:00

I have a winform with multiple PictureBox controls on it. I have a context

  • 0

I have a winform with multiple PictureBox controls on it. I have a context menu which is attached to all of these PictureBox controls. I have 3 submitems (menus) in the context menu which should be displayed in right click on any of the PictureBox instances and that works fine.

Now, before the context menu pop ups, I need to check the properties of PictureBox where it is clicked to enable or disable certain sub menus.

 private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
    {

    }

I see this event, but the sender object is a reference of ContextMenu. I need the PictureBox parameter to do this.

  • 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-05-22T02:53:42+00:00Added an answer on May 22, 2026 at 2:53 am

    I haven’t tried this but you might want to look at the SourceControl property of the ContextMenu (sender).

    It should have a reference to the actual control the ContextMenu is being displayed for.

    The MSDN page I linked to also has a sample that I think will be helpful. They are listening to the Popup event though, but it should be the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have multiple DataGrids throughout my winform app and I want to
I have a winform with two data grids, and multiple text boxes. I want
I have a WinForms application, which I need to support in multiple languages. I
Following is the scenario. I have something called as Domain which can have multiple
I have a mixed Winform/WPF application which frequently throws the exception: Could not load
I have multiple 1.5 GB CSV Files which contain billing information on multiple accounts
In my winform application I have the following scenario: I want to get multiple
I have a WinForms application with many menus, each menu has an average of
I have multiple winforms applications that download large sets of reference data on startup.
I have a C# Winforms program with multiple textboxes. I used the properties for

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.