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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:58:08+00:00 2026-06-17T04:58:08+00:00

I am tracking if an event has been fired like this: bool IsFormLoaded; private

  • 0

I am tracking if an event has been fired like this:

bool IsFormLoaded;
private void Form1_Load(object sender, EventArgs e)
{
    //Do stuff
    IsFormLoaded = true;
}
private void button1_Click(object sender, EventArgs e)
{
    //Do stuff
}

But doing this for many events is not elegant so I want a solution that lets me check if any event was fired like this:

bool IsFormLoaded = IsEventFired(Form1_Loaded);
bool IsButton1Clicked = IsEventFired(Button1_Click);
  • 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-17T04:58:09+00:00Added an answer on June 17, 2026 at 4:58 am

    You are handling events using designer. You can do it for example in constructor like follows:

    this.Load += delegate { IsFormLoaded = true; };
    button1.Click += delegate { IsButton1Clicked = true; };
    

    IMO it’s more elegant 🙂

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

Sidebar

Related Questions

An answer to this question has led me to look into using Event Tracing
Edit: While this question has been asked and answered before ( 1 ), (
Wow, this one has me tearing my hair out. I'm tracking links in JQuery.
I feel like I've been all over the web for this but haven't found
I have come across this before, and the answer has been either to null-terminate
On Google Analytics, I'm not seeing my custom tracking event from within my chrome
I am using google analytics event tracking to track 2 Facebook canvas application. (they
I have tracked two event values customReport1 and CustomReport 2 using GA event tracking
I have been tracking emails for years using a "beacon" image and for those
I wish to use event tracking to record clicks on a specific type of

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.