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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:25:10+00:00 2026-05-21T02:25:10+00:00

Possible Duplicate: How can I make my own event in C#? Sir, I have

  • 0

Possible Duplicate:
How can I make my own event in C#?

Sir, I have some queries regarding events…

  1. I want to write my own event that should be fired when user click 3 times on a button?
  2. In a client server application a client is connected to server, now if client disconnects then i want it must trigger an event on the server notifing that it is disconnected. I can achieve this using timer or some loop and a different thread. This thread continuously check the connection of the client. That is it. But it is somthing like polling mechanism. I want to write something like interrupt mechanism. I mean i dont want to use timer or loop. When a client disconnects willingly or unwillingly either from client side or server side my server should notify that client is disconnected. Please dont tell about how to make custom events.
    Please help…
    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-21T02:25:11+00:00Added an answer on May 21, 2026 at 2:25 am

    1 You can implement a hander for an event of single click on a button. So, it will be executed each time the button is clicked. This handler will count the number of clicks and raise another event if there were 3 clicks.

    int nClicks;
    event EventHandler TrippleClick;
    
    public Form1()
    {
        InitializeComponent();
        this.button1.Click += new System.EventHandler(this.button1_Click);
        nClicks = 0;
        TrippleClick = new EventHandler(OnTrippleClick);
    }
    
    void OnTrippleClick(object sender, EventArgs e)
    {
        MessageBox.Show("Tripple click");
    }
    
    private void button1_Click(object sender, EventArgs e)
    {
        nClicks++;
        if (nClicks == 3)
        {
            TrippleClick(sender, e);
            nClicks = 0;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: In JavaScript can I make a “click” event fire programmatically for a
Possible Duplicate: How can I make XSLT work in chrome? I have this XML
Possible Duplicate: How can I make a horizontal ListView in Android? I have used
Possible Duplicate: How can I make Turtle recognize a circle? I have a function
Possible Duplicate: In JavaScript can I make a “click” event fire programmatically for a
Possible Duplicate: How can JavaScript make new page that contains more JavaScript? I tried
Possible Duplicate: How can I make an EXE file from a Python program? i
Possible Duplicate: Sleep Less Than One Millisecond How can I make a program sleep
Possible Duplicate: Can I scroll a ScrollView programmatically in Android? I have a chat
Possible Duplicate: Can Read-Only Properties be Implemented in Pure JavaScript? I have an Object

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.