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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:34:14+00:00 2026-05-21T20:34:14+00:00

I have a ListBox in my winforms app and I need to handle the

  • 0

I have a ListBox in my winforms app and I need to handle the ItemChecked becaue each time the users cliks an item i need to some stuff. The problem is that I also need to change the Checked property in some other events of the form. In those cases I need to avoid do that stuff.

Example:

private void listBox1_ItemChecked(object sender, ItemCheckedEventArgs e)
{
  if (true) //Should check if item was clicked.
  {
     //Do some stuff
  }
  else //If the event was fired because I changed the Checked property from the code
  {
     //Do some other stuff
  }
}

Thanks

  • 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-21T20:34:15+00:00Added an answer on May 21, 2026 at 8:34 pm

    One way would be to use a bool variable let’s say ManualRaise. When you are raising the event through code, set ManualRaise = true and inside your event you can check ‘

    if(ManualRaise) 
    {
    // this was manual event raise
    ManualRaise = False
    } 
    else 
    {
    }
    

    and in that event where you will raise the list box event, set the ManualRaise to true.

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

Sidebar

Related Questions

I have a ListBox in winforms , C# application. i need to add to
I've a ListBox in my winforms app. I want it to have as DataSource
(I'm working in winforms using c#) I have a Listbox ,with some items added
I have a Winforms app and an employeeListBox, departmentComboBox and some textboxes to show
I have several winforms listbox controls I am hosting in a user control. The
I have a .net winforms ListBox and I've added items to it using .Add().
I have a ListBox and I need to repeat the styles to be the
I have a listbox for a Windows Phone 7 app that displays info parsed
I have two ListBox in my winforms application, I assigne a datasource for both
I have listbox which binds data to DataTable and now I need to access

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.