mouse

How to create Paint-like app with XNA?

微笑、不失礼 提交于 2019-12-05 22:26:35
The issue of programmatically drawing lines using XNA has been covered here . However, I want to allow a user to draw on a canvas as one would with a drawing app such as MS Paint. This of course requires each x and/or y coordinate change in the mouse pointer position to result in another "dot" of the line being drawn on the canvas in the crayon color in real time. In the mouse move event, what XNA API considerations come into play in order to draw the line point by point? Literally, of course, I'm not drawing a line as such, but rather a sequence of "dots". Each "dot" can, and probably should,

Monitor mouse coordinates in real-time in Linux

旧时模样 提交于 2019-12-05 22:18:34
I need a python coding to monitor mouse coordinates in real-time in Linux. I found below coding and it works well, but the mouse coordinates information will be shown in a pops up GUI window. Now I don't need it show in a GUI window, just need save the mouse coordinates information to a text file(Log file). Does anyone can help me that? Thanks! Plus, it would be great if it can save mouse coordinates information by hourly. #!/usr/bin/env python """ Corrected, the thread stops now. """ import sys import os from time import sleep import gtk gtk.gdk.threads_init() import threading # uses the

Mouse left button up event and openfiledialog

≯℡__Kan透↙ 提交于 2019-12-05 22:02:14
I have few images in a grid, then when i click a button, a "open file dialog" comes up.(of course, over the images) Microsoft.Win32.OpenFileDialog dlgOpenFiles = new Microsoft.Win32.OpenFileDialog(); dlgOpenFile.DoModal(); The images have a LeftButtonUp event attached. The problem is that if i select a file by double clicking it, the open file dialog closes(which is good), but besides that, the image behind the clicked file is receiving a LeftButtonUp message which is not good at all. I am using wpf/c#/vs2010 The simple way to get around it, is whenever you need a handler to button-up event,

Bind Mouse Wheel To Jquery UI Slider

空扰寡人 提交于 2019-12-05 21:05:30
I did searches and there were a few similar posts but I can't seem to get it to work. I know that its a cliche but I am quite new to JQuery and JQuery UI as my core skills is PHP, so any help is greatly appreciated. Below are the codes that I have for the JQuery vertical slider. $("#VerticalScrollBar").slider({ orientation: "vertical", change: VerticalHandleChange, slide: VerticalHandleSlide, min: -100, max: 0 }); and the functions function VerticalHandleChange(e, ui) { var maxScroll = $(".VerticalScroll").attr("scrollHeight") - $(".VerticalScroll").height(); $(".VerticalScroll").animate({

Swing: GlassPane prevents mouse pointer from changing

我怕爱的太早我们不能终老 提交于 2019-12-05 19:33:10
I have a JTabbedPane with some tabs and a lot of unused extra space next to the tabs. So I'm trying to use it and place some buttons there (like in Eclipse). I put the buttons on a GlassPane: JPanel glasspane = getPanelWithButtons(); // panel with FlowLayout.RIGHT frame.setGlassPane(glasspane); glasspane.setOpaque(false); glasspane.setVisible(true); This works, and I still can click through on the other elements of my gui (most search results I found are about how to prevent this). The only problem so far is that the mouse pointer doesn't change to that double-ended horizontal arrow when it

Windows virtual mouse driver

旧街凉风 提交于 2019-12-05 17:19:58
I am developing a KMDF virtual mouse driver. The general idea is a KMDF root enumerated non-filter driver which will be able to send output reports to the mouse and keyboard driver stacks. My driver is already working and sending requests to other driver stacks, but with no result. Report types and packet formats are pretty undocumented on Microsoft resources. There are no information about which data and to which device I need to send in order to move the mouse pointer, simulate clicks (with either mouse or keyboard). There is only general information about HID clients, drivers etc. Their

Assign Mouse Buttons in Visual Studio 2008

£可爱£侵袭症+ 提交于 2019-12-05 16:48:52
问题 Does anyone know how to bind extra mouse buttons to commands in visual studio 2008? There used to be a "powertoy" that let you do it for visual studio 2003, but I can't find an equivalent for 2008. 回答1: While AutoHotKey was interesting, it doesn't really do what I want to do, which is map buttons to keys in an application-specific context. I ended up finding this add-in: http://www.codeproject.com/KB/macros/MouseNavi.aspx which I just modified and threw into the AddIns directory for Visual

Sending a Mouse Click to a Specific Position without Moving the Mouse

谁说胖子不能爱 提交于 2019-12-05 15:18:28
I'm looking to send a mouse click to a specific position on a screen without affecting the mouse cursor's location. I've scoured and have tried everything under the sun with mouse_event (which is supposed to do this) mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0); However this ends up only sending a mouse click to wherever the position of the mouse is. So I end up having to move the mouse to get it to work. Cursor.Position = new Point(X, Y); Anyone have any idea how I can do this WITHOUT having to move the mouse? I've also tried the following code block with no success as

Ogre3D, Multiple Monitors, and the Mouse Cursor

只谈情不闲聊 提交于 2019-12-05 14:24:39
I am developing an application that requires multihead rendering in OpenGL. Right now, I can render to multiple screens, but the travel of my mouse cursor is limited to a single screen. However, I'd like to be able to use the mouse cursor on all of the rendered screens. Has anyone run into this same issue, and if so, how did you go about resolving it? I found a working solution for this. First, I had to instantiate my Ogre::RenderWindow objects in windowed mode rather than full-screen mode -- full-screen mode was emulated easy enough by instantiating the Ogre::RenderWindow objects without

Pop-up menu using mouse rightclick in JUNG

﹥>﹥吖頭↗ 提交于 2019-12-05 12:01:34
I want to create a pop-up menu, which will appear if i right clicked on the canvas . How can I do this? which function should i modify? Any help would be appreciated. Following code will create a popup menu when right-clicking either on the vertex or on the canvas... /** * a GraphMousePlugin that offers popup * menu support */ protected class PopupGraphMousePlugin extends AbstractPopupGraphMousePlugin implements MouseListener { public PopupGraphMousePlugin() { this(MouseEvent.BUTTON3_MASK); } public PopupGraphMousePlugin(int modifiers) { super(modifiers); } /** * If this event is over a