Questions tagged [mousecapture]

27 questions
16
votes
4 answers

wpf popup doesn't close automatically when datagrid inside popup captures the mouse

I have a popup with StaysOpen=False so I want to close it by clicking anywhere outside of popup. Inside a popup I have a DataGrid. If I open popup and then click somewhere else the popup will be closed. But it won't happen if before clicking outside…
Snowbear
  • 16,924
  • 3
  • 43
  • 67
4
votes
2 answers

Why the new Form dosen't stick to the mouse movement position when moving the mouse fast?

I have this event: protected override void OnMouseDown(MouseEventArgs e) { mOffset = new Point(Width / 2 - e.X, Height / 2 - e.Y); mCurrentPoint = PointToScreen(new Point(e.X + mOffset.X, e.Y + mOffset.Y)); mTargetPoint = mCurrentPoint; …
Ben Kochavi
  • 293
  • 1
  • 4
  • 15
3
votes
1 answer

wpf mousecapture being force released immediately

I'm building a user control that includes a flyout panel. When I click the button to open the panel I'm trying to capture the mouse so that I can detect if the user clicks off the flyout panel so I can close it. But right after I capture the mouse,…
Joel Barsotti
  • 3,031
  • 7
  • 35
  • 59
3
votes
1 answer

What does Mouse.Capture mean?

Oops, I have a lot of questions that can't find answers to them in Google. Everybody is just using codes, and nobody explains their purposes. What does Mouse.Captured mean? And What does Mouse.Capture() do? And (sorry the last one) when…
amiry jd
  • 27,021
  • 30
  • 116
  • 215
2
votes
1 answer

Cocoa - capture mouse just like screencapture utility

I am trying to find the answer to a topic which has basically driven me insane. Is there a way to capture the mouse pointer much like Apple's screencapture utility works? What I am trying to do requires me to draw a clear window that does not…
MAH
  • 841
  • 6
  • 16
1
vote
1 answer

How to find if Mouse is already Captured

I created a usercontrol which contains a Canvas and a Button on the Canvas. To be able to move the button over the canvas I attached a DragBehavior shown below: class DragOverCanvasBehavior : Behavior { private Point…
Souvik Basu
  • 3,069
  • 4
  • 28
  • 42
1
vote
1 answer

flash release mouse capture on mouse out

I have a flash app loaded in an iframe. User mouses down in flash and goes outside of stage. When user goes outside of stage, is there a way to release the mouse capture from flash so that parent receives further mouse events and not the flash app? …
Alkesh
  • 61
  • 1
  • 3
  • 9
1
vote
1 answer

How to prevent right mouse click from changing the mouse capture control

This is an annoyance I am seeing with .NET WinForms mouse events. To reproduce, do the following: Left mouse down on a Button Control. (This changes the capture control to that button) Move mouse off of that button. While still holding on to the…
1
vote
0 answers

Horizontal Autoscroll on ListBox is blocking

I want to implement a rubber-band selection of items in a wpf horizontal ListBox. In principle it works, except that with many items in the list, the program freezes for a long time or even forever when the mouse is moved also below the…
user2452157
  • 313
  • 2
  • 13
1
vote
1 answer

How To Let A Grid Capture The Mouse, But Still Allow It's Children To Handle Click Events

Sorry in advance if the title is confusing. Here's the situation. I have a grid called grdFilters. This grid has a series of CheckBoxes within it (one per row). Normally this grid is hidden. But I wanted it to show up when prompted (on button click)…
Ryoku
  • 397
  • 2
  • 16
1
vote
1 answer

Disable mouse capturing by Button

I create custom ContextMenuStrip with Button in it: ContextMenuStrip _contextMenu = new ContextMenuStrip(); _contextMenu.Items.Add(new ToolStripMenuItem("Item")); _contextMenu.Items.Add(new ToolStripControlHost(new Button())); When I open this…
melya
  • 578
  • 5
  • 24
1
vote
1 answer

Capture mouse messages when a ToolStripDropDown is shown

I am trying to create a "tooltip" which contains a custom control. I implemented it using ToolStripDropDown which does what I need - closes when the user clicks somewhere else, or activates another window etc. However, I'd like to be able to get the…
crypto_rsa
  • 341
  • 1
  • 12
0
votes
2 answers

How do I capture the mouse when a Silverlight RepeatButton is depressed?

I have a RepeatButton on a UserControl that acts as the up button. The control is a number spinner of sorts. When the number value goes from 9 to 10 the up button is released because it moves out from under the mouse. I know I can capture the…
Jordan
  • 9,642
  • 10
  • 71
  • 141
0
votes
0 answers

Clipping Image from screen - MFC in C++

I have several applications which want to capture a portion of the screen into a CImage. I have been doing it by creating a CImage the size of the screen and copying the screen into it. I then create a window that overlays the screen and displays…
0
votes
1 answer

user32.GetAsyncKeyState on python to capture keys and mouseclicks

import time import ctypes import threading user32 = ctypes.windll.user32 mouse_clicks = 0 keystrokes = 0 def getKeyPressed(): global mouse_clicks global keystrokes for i in range(0,256): if user32.GetAsyncKeyState(i): # …
micky
  • 1
  • 1
1
2