Indicates the state of the Alt , Ctrl , and Shift keys at the time of the mouse action. Most of the time, you need the coordinates returned in a mouse-event handler, but sometimes you also need to check Button to determine which mouse button caused the event. Note: Delphi uses the same criteria as Microsoft Windows in determining which mouse button has been pressed. Thus, if you have switched the default "primary" and "secondary" mouse buttons so that the right mouse button is now the primary button , clicking the primary right button will record mbLeft as the value of the Button parameter.
From RAD Studio. Jump to: navigation , search. Go Up to Responding to the Mouse A mouse event occurs when a user moves the mouse in the user interface of an application. Mouse events : Event Description Vcl. OnMouseDown event Occurs when the user presses a mouse button with the mouse pointer over a control. OnMouseMove event Occurs when the user moves the mouse while the mouse pointer is over a control. Check if Mouse LButton is down? Ask Question. Asked 12 years, 2 months ago.
Active 8 years, 10 months ago. Viewed 14k times. I tried Mouse. IsDraging,but no result. Improve this question. Ivan Prodanov Ivan Prodanov Add a comment. Active Oldest Votes. The linked documentation directly contains the answer to your question: The GetAsyncKeyState function works with mouse buttons. Improve this answer.
VERY nice. Although you give the solution about checking the most significant bit, could you describe the formal way of getting it? Changing cursors while a mouse button is pressed - undesired behaviour. Board index » delphi » Detect the mouse button is pressed Deamond.
Detect the mouse button is pressed. Re:Detect the mouse button is pressed. Andreas Kyriaco. Other Threads 1. Detecting mouse wheel when mouse over taskbar button 2. Detect Button Pressed. Help: How to detect if button is pressed.
0コメント