473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Dragging the mouse over a control

Hello,

I have a control which I need to act in a specific way when the user
drags the mouse on it. Means, that the user should click on the
control's one position, hold the mouse button, move it to another
position on the control, and releases the mouse. It isn't like drag and
drop, when two objects are interacting. Here I have only one control.

Also, I need to when the user also pressed the ctrl key while dragging.

Please help.

Thanks,
Ohad.

Apr 23 '06 #1
1 1775
oh******@netvision.net.il wrote:
Hello,

I have a control which I need to act in a specific way when the user
drags the mouse on it. Means, that the user should click on the
control's one position, hold the mouse button, move it to another
position on the control, and releases the mouse. It isn't like drag and
drop, when two objects are interacting. Here I have only one control.

Also, I need to when the user also pressed the ctrl key while dragging.

Please help.


When the user clicks on the control you'll get the MouseDown event.
When the user moves the mouse you'll get MouseMove events.
When the user releases the mouse button you'll get the MouseUp event.

You can query the status of the Ctrl key with Control.ModifierKeys oder
use the KeyDown event.

hth,
Max
Apr 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Chris Stewart | last post by:
In ASP.NET, what technology would I use to drag images around the screen? Once the dragging is over, I'd need to fire an event in my codebehind using the x/y of the new placement of the image.
0
by: alcurb | last post by:
I have a ListView control populated with 30 items. ListView height only allows you to see 20 rows at a time. I want to drag an item to the bottom of the list (to the last row), but ListView...
3
by: Liz | last post by:
I need to implement dragging a borderless form by clicking/dragging on the form surface. Using the "standard" approach (setting "CanMove" flag on MouseDown, moving the form by the delta of the...
0
by: chris.dannemiller | last post by:
The list box control allows the user to click the mouse down and scroll the control up and down if the user bring the mouse past the extents of the control. How can this be replicated in a custom...
4
by: vunet.us | last post by:
I have an SVG file and draggable div on one page. When I move div over this SVG file, it looks like div loses control and detaches from the mouse. If I do it slowly, div seems to barely follow the...
1
by: Emanuel | last post by:
I am trying to make a little diagramming app in C# with the 1.1 Framework (currently our standard here at work, will be upgrading to 2005 sometime in the next couple of months). I want to allow...
2
by: Abubakar | last post by:
Hi, In a normal Windows.Forms.TextBox control, I want to be able to select a text (ie highlight, this is by default possible) and than be able to drag that text through my mouse pointer to another...
0
by: andytsummers | last post by:
Hi I have tried to implement drag and drop by using the following code but I have several problems. 1. When you put your mouse over selected text the cursor is still the i-beam and therefore...
3
by: Beorne | last post by:
Hello, I have to ralize a graph with a pair of straight vertical lines that have to be dragged in the left-right direction with the mouse. I've never done something similar so I wonder if someone...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.