Questions tagged [mouseclick-event]

An event that is triggered when a Mouse input device is clicked

A MouseClickEvent is an event that is triggered when a button on a Mouse input device is clicked. The event contains information such as the particular button that was clicked, the length of time that the button was pressed, and how many times the button was clicked (single-click, double-click, etc)

577 questions
6
votes
6 answers

Detect both left and right mouse click at the same time?

I'm remaking windows Minesweeper (from XP) and something they had included was that if you click a number with as many flags as it's number with the left and right mouse button at the same time, it reveals every other hidden tile around that…
Corey Ogburn
  • 21,622
  • 25
  • 107
  • 169
6
votes
2 answers

Remove unused C# code in Visual Studio

when working on a windows form I have accidently clicked on buttons and now I have part of code related to this click event. I don't need them and I would like to remove these parts from the code but, if I do, Visual Studio complains when compiling…
opt
  • 467
  • 9
  • 22
6
votes
1 answer

D3 update dataset on click and redraw the bar chart

I am new to d3 as well as javascript, and I am having trouble updating the dataset, as well as redrawing the bars. This is the code I have been looking at so far. http://jsfiddle.net/TwEhT/2/ I have a function clickEvent, that is evoked upon a…
user2159121
  • 125
  • 1
  • 7
5
votes
1 answer

Programmatically clicking on View element from different app

I want to write a service that sits in the background and when headset media button is pressed some specific ListView element from different app will be clicked. Right now I'm only able to activate some specific Activity that has only ListView…
pzo
  • 1,959
  • 3
  • 22
  • 40
5
votes
3 answers

C# Right mouse click on button does not raise mouseclick event

I have a button on a form and want to handle both left and right clicks. I am handling the MouseClick event, but this is only raised on a left click. Is this a problem somewhere in my code (a setting that I have missed) or the intended…
Mark
  • 1,649
  • 4
  • 25
  • 43
5
votes
2 answers

How to detect side mouse clicks in Javascript?

Is it possible to detect using JavaScript when the user clicks the back/forward buttons that are the side of your mouse ? These are known as XButtons as far as I know, in .net at least. This is for a locally installed app so I don't need cross…
Michael Low
  • 23,431
  • 15
  • 75
  • 115
5
votes
2 answers

How to enable right click in p5.js?

I'm making a minesweeper clone, left click reveals the cell and right click is supposed to flag the cell. I'm using the function mouseClicked() - this allows me to reveal on left click and also reveal on right click. I tried using if(mouseIsPressed)…
ObamoDank
  • 101
  • 1
  • 5
5
votes
1 answer

Disabled Left Click (for Psych Experiment), but focus changes in IE. How to prevent?

I am conducting some Psych experiment on web design, and I want to disable both mouse clicks. (Please ignore usability issues. I know about them. I intentionally do this for the purpose of my psych experiment.) So far I succeeded disabling both…
user605660
  • 199
  • 2
  • 2
  • 7
5
votes
1 answer

Angular - Change Font Awesome icon color on click

I created a component named "like" with the following HTML:
When I click on the icon, it should change the variable "isActive" and consequently the color of…
mgiurni
  • 145
  • 1
  • 2
  • 8
5
votes
2 answers

Draw a Polygon using Mouse Points in C#

I need to be able to draw a polygon using mouse click locations. Here is my current code: //the drawshape varible is called when a button is pressed to select use of this tool if (DrawShape == 4) { …
Chris Bacon
  • 997
  • 8
  • 28
  • 42
5
votes
0 answers

Bokeh: Passing a variable to a url on MouseClick - OpenURL vs. CustomJS

I have a Bokeh graph with some points in it and I'm trying to catch a variable belonging to any point on MouseClick. Code examples are below this text. Using the OpenURL method everything works as expected. The value of variable @ref is put into the…
Patrick
  • 51
  • 2
5
votes
6 answers

Detect background click in jQuery

Say I have the following HTML:
span text div text some more text
I want to make it so that when I click on span, it will trigger some event (e.g. to make the text bold), that's easy: $('span').click( ...…
Senseful
  • 73,679
  • 56
  • 267
  • 405
5
votes
1 answer

How to update Javascript global var inside a click event function

Using Javascript & jQuery, I'm trying to get the mouse coordinates of a click event to use in other Javascript functions. My problem is that global variables set within an event function do not seem to update outside the function, like global vars…
4
votes
1 answer

Mouse events not fired

I'm making a C# WinForms application. The MouseMove and MouseClick events of the form aren't getting fired for some reason. (I'm probably going to feel like an idiot when I find out why.) It is a transparent form (TransparencyKey is set to the…
Joshua Walsh
  • 1,676
  • 5
  • 21
  • 45
4
votes
2 answers

What could cause mouse clicks sent by PostMessage to be ignored?

I was looking for a way to send mouse clicks to a background application on Windows (ie. by handle), The test window I used to confirm my code was working accepts and processes the clicks, but my target application does not (even though Spy++ shows…
mina
  • 389
  • 1
  • 6
  • 13
1 2
3
38 39