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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:03:08+00:00 2026-05-11T10:03:08+00:00

I want to implement a custom scrollbar but want it to work like the

  • 0

I want to implement a custom scrollbar but want it to work like the standard one. So I need to detect that the mouse button is held down over either the up or down arrow at the ends of the bar so that the user can scroll using the bar ends.

How can I detect that the button is being held?

MouseDown only fires once when the button is first pressed. MouseUp will fire when the button is released but is there a better way than to have some sort of timer that triggers periodically between MouseDown and MouseUp?

  • 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. 2026-05-11T10:03:08+00:00Added an answer on May 11, 2026 at 10:03 am

    I don’t think you’re going to be able to do better than using a Timer (although I may be surprised).

    I’ve used Timers before for the same purpose, and they work, usually like this:

    • The Timer Start()s, using an Interval of ~200ms when the button goes down. The mouse is also Captured at this point.
    • Each Tick effects a scroll. (The first Tick also changes the interval to ~25ms)
    • When the mouse comes up, the Timer.Stop()s.

    The changing of the Interval from 200 to 25 means that they have to hold the mouse down for a while, but once they do, the scrolling action happens more quickly/smoothly.

    The button being ‘held’ really isn’t an event, it’s more of a state (i.e. it doesn’t occur at a specific point in time).

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

Sidebar

Related Questions

I want to implement a custom trace listener like follows: public class TraceListener :
I want to implement a custom assembly signature mechanism just like Strong Name, then
I want to implement a JTextField with custom fonts.I came to know that we
I want to implement custom JSP list tag, but have problem with accessing properties
I want to implement a custom AutocompleteTextview in which i need three textview for
I want to implement something like a WCF OData provider but using NetTcpBinding instead
I want to develop a functionality such that to implement custom camera functionality in
im trying to implement a custom error page, what i want to be able
I'm trying to implement a DataGrid in ASP.NET, and want to achieve custom paging
I want implement in my software solution an VBA editor but in c# 3.0.

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.