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

  • Home
  • SEARCH
  • 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 8748877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:36:00+00:00 2026-06-13T12:36:00+00:00

Basically let’s say I’m making a simple counter, when I click the mouse, the

  • 0

Basically let’s say I’m making a simple counter, when I click the mouse, the counter goes up. My question is how do I program an even that makes it possible for me to have the counter flowing while the mouse I held down, basically something that works exactly as the KeyPress event handler, only with a mouse.

  • 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-13T12:36:00+00:00Added an answer on June 13, 2026 at 12:36 pm

    If you don’t need a timer running for some other reason, I wouldn’t use a timer. I would use a class property or global variable, depending on what you’re doing.

    private/public startTicks long = 0;
    

    When you fire the MouseDown event:

    startTicks = DateTime.Now.Ticks;

    On the MouseUp event, take the difference and convert it to whatever time element (min, sec, hour) you want.

    DoConversion(DateTime.Now.Ticks - startTicks);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a Type II SCD database, that is basically append only.
Let's say I am building an web app that is connecting and basically parsing
I'm writing a simple message queue library that will basically let you set up
Let's say I'm basically inheriting a live site that has a lot of errors
Basically, let's say that I have a batch file that calls myapp1.exe and myapp1.exe
Basically in order to have a profile Block u need - let's say profile
Basically I'm trying to set the SaveFileDialog's filter like let's say to... Xml Document
Let's say I have the following short-tag regex: \[BANNER{([0-9]*)}{(site1|site2)}{([A-Z]*)}\] basically, I have a CMS
I'm not sure what to call this, but basically let's say I have a
Let me describe the thing that I want to accomplish: I basically want to

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.