473,803 Members | 3,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

detecting a cancelled drag

Hi,
I need to be able to detect when a drag is cancelled after it has started.
Meaning: after the drag operation has begun, and the user does not complete
the drag, but releases whatever's being dragged before it reaches it's
supposed destination. I need something to happen at that point, and
surprisingly there's no event for like DragCancelled or something in
Control. So does anyone have any idea how I could do this? Thanks,

Chris
Nov 16 '05 #1
1 2134
Nevermind, i figured it out. In case you're wondering, in the
QueryContinueDr ag event handler, I used this code:

if((e.KeyState & 1) == 0) {
// left mouse button has been released
}

the KeyState documentation is here:
http://msdn.microsoft.com/library/de...statetopic.asp

Chris
Nov 16 '05 #2

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

Similar topics

2
2650
by: Kiteman - Canada | last post by:
Is there an event triggered when a form is dragged by its titlebar? I have two forms on screen - the main form is draggable and I need the secondary form to automatically reposition itself adjacent to the main form if the main form is relocated. Tom
3
1696
by: RM Powell | last post by:
OK, this is probably a dumb, newbie quesiton. But I've searched quite a bit on this group and in the "help" files and haven't been able to find the answer. I run a crisis program for kids and families. I have a form that is completed when a new person enters the program. The basic form includes a client ID and demographic information with subforms for information about the particular intake. Right now, you open the form in data entry...
7
19506
by: John Baker | last post by:
Hi: I have a pop up form based on a query. I am openings the form, and wish to close it immediately if the query has result. My method is to put a macro in the "on Open" event , which has the following code IsNull() Close (the form I just opened)
3
5879
by: =B= | last post by:
Hi all, I was wondering if anyone has had any luck with trapping the <BODY> onUnload() event in ASP.NET? The thing is, I'm writing code for an Intranet site. The code makes a call to a third-party component (think of it as a lock) when the page loads. Now the OK and Cancel server buttons I can handle and use to release the lock as required. But previously in classic ASP I had been trapping the user hitting the close 'x' button by...
2
3044
by: Sam-Kiwi | last post by:
I've spent the last 6 months developing a pay-per-download website using ASP.NET Users purchase documents and then download them. The intention is that users are only charged for documents they successfuly download. My problem revolves around detecting a successful download, the steps I take to handle the download are as follows:
4
2566
by: jcrouse | last post by:
I am using the following code to move a label on a form at runtime: If myMousedown = lblP1JoyRight.Name Then If lblP1JoyRight.BackColor.Equals(Color.Transparent) Then bTransCk = True lblP1JoyRight.BackColor = clrLabelMove
2
1762
by: Martyr2 | last post by:
Hi, I am working on a drag and drop application where I can click and drag one image and drop it onto a target image. The only way I am able to detect the name of the target I am dropping on is if the current layer is a lower z-index than my target (so the drop target is actually at the forefront). Some requirements I have is that:
1
3962
by: gtwannabe | last post by:
I'm having a problem with a form that uses AutoNumber as the primary key. I have an Abort button to delete the current record and close the form. If AutoNumber is assigned, the code executes a SQL statement that deletes the current record. I need to be able to detect when AutoNumber is unassigned (a new blank record) so that I can simply close the form without running the SQL delete statement. Unfortunately, no tests I can think of...
0
1169
by: Neil Moss | last post by:
Hi all I have a SoapExtension that is monitoring various aspects of all web service activity from my WinForms client. From within the extension, is there any way that I can detect that an asynchronous web service method call was cancelled via the CancelAsync call? At present, after a call to CancelAsync, no further activity is recorded in the extension. Even my stream that I have chained via ChainStream is left open - no call is made...
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9565
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5633
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.