Bhagirath N Sai
Bhagirath N Sai

Reputation: 199

Perform a function till mouse is pressed down

I want to how to implement this

Till i press the mouse button down i want some code to execute. The problem is I used mouse Down event but it works like a mouse click event. Can you please help.

Upvotes: 0

Views: 57

Answers (1)

Patrice
Patrice

Reputation: 4692

Create 2 functions, one to start your code to execute, and one to stop it.

Call the start on a mouseDown event, and call the stop on mouseUp.

Unless I don't understand what you're trying to do, that should be the way to go.

Upvotes: 1

Related Questions