mouse

Tkinter get mouse coordinates on click and use them as variables

风流意气都作罢 提交于 2019-12-01 10:12:04
I am completely new to Python. Therefore don't get too mad at me, because I am sure that there are basic things that I am missing. Here is my problem: I am trying to extract mouse-click coordinates from an image and use those coordinates as variables. The code allows to import and image, from which I want to extract the coordinates. Some prompts ask the user about size and extent of the diagram, after which I would like to set up a coordinate grid by clicking the origin, and the end point on the x- and y-axes respectively. The idea is to use these 3 sets of coordinates and transform them into

How I can stop vertical scroll by mouse

£可爱£侵袭症+ 提交于 2019-12-01 10:11:09
I am using java script/Jquery in web browser.I made a custom horizontal scroll bar which is working with mouse wheel or mouse scroll.commonly mouse scroll works with vertical bar.So it conflict with my programmed horizontal scroll bar. I dont want to remove vertical bar completely but just only to disable when we scroll our mouse.If you make sense then please suggest. Regards, Deepak In your CSS: overflow-y: hidden; Might work 来源: https://stackoverflow.com/questions/6625343/how-i-can-stop-vertical-scroll-by-mouse

8086 assembly right mouse click interrupts

依然范特西╮ 提交于 2019-12-01 09:56:15
问题 I am working on a project in 8086 assembly on windows machine and I need to know which mouse button has been clicked. What are the interrupts for this? or how do I go about finding this out? Thanks 回答1: If you're making a DOS program that runs under windows, you can use software interrupt 0x33, function 3, which returns the button status in the BL register : mov ax,0x3 int 0x33 test bl,1 jnz left_button_pressed test bl,2 jnz right_button_pressed More info here http://www.ctyme.com/intr/rb

Disable mouse promotion

孤者浪人 提交于 2019-12-01 09:25:28
Is there any way to disable mouse promotion from code, that is preventing windows to interpret touch events as mouse events? I capture touch events in my WPF application, and I don't want these interactions to effect mouse pointer visibility and position. There is a TouchFrameEventArgs.SuspendMousePromotionUntilTouchUp Method that seems to be doing exactly that. Unfortunately it's available only for Silverlight and Windows Phone. In addition there are some system settings you can use to disable double click and right click promotion, but nothing to disable mouse promotion as a whole. A Windows

Moving Shape via Mouse in Opengl

拈花ヽ惹草 提交于 2019-12-01 08:49:34
问题 void Rectangle(void) { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_QUADS); glColor3f(1.0,0.0,0.0); glVertex2f(m_x-0.25,m_y-0.25); glColor3f(1.0,0.0,0.0); glVertex2f(m_x-0.25,m_y-0.75); glColor3f(1.0,0.0,0.0); glVertex2f(m_x-0.75,m_y-0.75); glColor3f(1.0,0.0,0.0); glVertex2f(m_x-0.75,m_y-0.25); glEnd(); glutSwapBuffers(); I want to move the rectangle to where pressed mouse. m_x and m_y are global variable.This function has called in main glutDisplayFunc(Rectangle), mouse function like this: void

Javascript mouse event not captured properly when mouse moved very fast

我是研究僧i 提交于 2019-12-01 08:24:54
I am using JavaScript mouseover and mouseout events when I move my mouse very quickly the events are not triggered. Can you tell me what the problem is? Please let me know how to solve this. Also let me know if anything else is needed. Here is the code HTML 4 => qq[ <ul id="primary"> <li id="firstTab" onmouseover="changeSecondaryMenu('index','explore');" onmouseout="changeSecondaryMenu('explore');"><a></a></li> <li id="secondTab" onmouseover="changeSecondaryMenu('home','explore');" onmouseout="changeSecondaryMenu('explore');"><a></a></li> <li id="thirdTab" onmouseover="changeSecondaryMenu(

Cocoa: Limit mouse to screen

拈花ヽ惹草 提交于 2019-12-01 08:12:08
I'm developing a kiosk mode application for OSX. In some circumstances, another screen gets attached. My application runs in fullscreen on one screen using: [self.window.contentView enterFullScreenMode:s withOptions:[NSDictionary dictionaryWithObject:appOptions forKey:NSFullScreenModeApplicationPresentationOptions]]; The options are the following: [NSNumber numberWithUnsignedInt:(NSApplicationPresentationHideMenuBar| NSApplicationPresentationHideDock| NSApplicationPresentationDisableHideApplication| NSApplicationPresentationDisableProcessSwitching| NSApplicationPresentationDisableAppleMenu)];

Disable mouse promotion

不想你离开。 提交于 2019-12-01 07:41:11
问题 Is there any way to disable mouse promotion from code, that is preventing windows to interpret touch events as mouse events? I capture touch events in my WPF application, and I don't want these interactions to effect mouse pointer visibility and position. There is a TouchFrameEventArgs.SuspendMousePromotionUntilTouchUp Method that seems to be doing exactly that. Unfortunately it's available only for Silverlight and Windows Phone. In addition there are some system settings you can use to

I want to use Robot class in java applet for web browser to move and click mouse

萝らか妹 提交于 2019-12-01 06:50:31
I have created this applet, It moves mouse to 1000 pos on screen. It works as application but it does not work in applet. I have created signed applet but still it wont move mouse. What should I do to make my Robot class work from browser? My code is as below: import java.applet.Applet; import java.awt.Graphics; import java.awt.Robot; import java.awt.AWTException; public class s extends Applet { public void paint(Graphics g) { g.drawString("Test1", 10, 10); } public void init() { try { Robot robot = new Robot(); robot.mouseMove(1000,50); System.out.println("code executes"); } catch (Exception

WinAPI get mouse cursor icon

倾然丶 夕夏残阳落幕 提交于 2019-12-01 06:45:48
I want to get the cursor icon in Windows. I think language I use isn't very important here, so I will just write pseudo code with WinAPI functions I'm trying to use: c = CURSORINFO.new(20, 1, 1, POINT.new(1,1)); GetCursorInfo(c); #provides correctly filled structure with hCursor DrawIcon(GetWindowDC(GetForegroundWindow()), 1, 1, c.hCursor); So this part works fine, it draws current cursor on active window. But that's not what I want. I want to get an array of pixels, so I should draw it in memory. I'm trying to do it like this: hdc = CreateCompatibleDC(GetDC(0)); #returns non-zero int canvas =