drag-and-drop

How to determine data type from DragEventArgs

I have implemented drag and drop in my application, but am having some difficulty determining the type of the object being dragged. I have a base class Indicator and several classes derived from it. A dragged object could be of any of these types. The code snippet below seems inelegant and is prone to maintenance issues. Every time we ad...

C# Drag and Drop functionality

I'm trying to achieve functionality similar to winzip/winrar, etc. I have a Treeview that displays the contents of a package (System.IO.Packaging). I want to be able to drag and drop a file or folder from the TreeView onto an explorer window or the desktop, etc. My problem is that I have to call DoDragDrop before I know if the object wa...

Dropping files on application icon in Dock

I have been hitting the wall on this issue for a few days now, and cannot for the life of me figure out what I am doing wrong (or if this is some kind of bug): I have a custom Mac application (in Java, if it matters). It essentially takes a specific type of document bundle, does some processing on it, and sends the results to a server. ...

Drag and Drop .sql scripts into SQL Management Studio 2008 does NOT work?

In SQL 2000 / Query Analyser, i used to be able to drag-n-drop T-SQL script files from Windows Explorer onto Query Analyser. Cannot do the same in SQL 2008 / Management Studio ? I can obviously do: File / Open / File... Navigate to the file Then Open it. But someone please tell me there is an easier way just like in 2000 ! EDIT 16/7...

vb.net how to handle text dragged onto a button to open a new form with the dragged text directly copied to the richtextbox on the new form?

hi, I want to achieve the following: The user drags text from any open window not related to my application ( like firefox or word, for example) onto button1 on form1 in my application. when he/she does that, a new form (called form2 that contains a richtextbox) will open and the dragged text is directly copied (or inserted) into the r...

ActionScript Continuously Dragging Objects Within Bounds From Off-Stage Mouse Coordinates?

is it possible for flash to detect off-stage mouse coordinates in order to continuously drag an object within its bounds while the mouse is moving outside of the stage? for example: i have a draggable red square on my stage. the stage is the bounds of the drag. if i drag the red square to the bottom of the stage and continue to drag ...

Dragging a button and dropping it at another location in its window

Hi all, I am trying a simple application with drag and drop: My application contains a window with a button over it. Idea is: user should be able to drag this button to another location in its window, such that its location changes but it performs same action when clicked! Can anyone suggest how can I implement it? Than...

Can we drop a file in windows explorer from WPF window?

I have a treeview that shows the current file system. I want to add functionality to enable dropping files into windows explorer. If I drag any of the node of my treeview and drop it on any of the window of Windows explorer then the file will be copied to that location. How can I accomplish this? ...

Win7 Drag&Drop: Possible to find out if COleDataObject contains shell library?

I have an application with a file and folder list control which supports Drag&Drop operations. Now I would like to make it possible for the user to be able to drop a Windows 7 Library (e.g. Music, Pictures and so on) into this control. In my drop handler I have a COleDataObject and now I'm trying to find out, if a library has been dropp...

download a file using windows IStream

I'm implementing dragging a virtual file out of a website and onto the desktop with an activex control. How do I create an IStream on my http url, so Windows can execute the drop? The example I'm looking at uses SHCreateStreamOnFile to copy a local file; there must be an analogous function for other types of streams like http file dow...

How to add html elements to a non html page

I am trying to write a firefox plugin which could allow people to annotate their bookmarked web pages and store the annotations locally. I am doing this by inserting appropriate div elements inside the body of the page and attaching appropriate handlers for allowing drag/drop kind of interactions on these elements. While I can easily a...

c++ - arguments to main

Hi! very basic question. i try to write a program that outputs the filenames of the files dragged onto the exe. i followed this guide for main arguments: http://publications.gbdirect.co.uk/c_book/chapter10/arguments_to_main.html this is my code: #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR*...

Display image while dragging

How can i put an image in corner or center of cursor while user dragging an item in ListView or other controls like that? When you dragging an image or text in Firefox; same thing occurs. ...

html5 detect how many files being dropped?

Is it possible to detect how many files are being dropped using HTML5 drag/drop? I can detect the number of files using e.dataTransfer.files once the files have been dropped but the filesList is empty for ondragover & ondragenter events. ...

Drag and drop overlapping ImageView in Android

Hello all, I have a table-top style game board consisting of 10x10 squares. Each square is a PNG image. On top of these squares I want to place tiles which can be drag and dropped on top of the squares. What would be my best approach concerning Views? Is it possible to have two layers where layer one is a grid of ImageView's which rep...

Silverlight ListBox Drag and Drop issue when "ItemsTemplate" provided

Hi, when i use controlToolkit:LisBoxDragDropTarget with ListBox i am able to do drag and drop... but if i provide ItemsTemplate to ListBox then "drop" is not working... Xaml which is working <controlsToolkit:ListBoxDragDropTarget x:Name="lstddPSGroups1" Grid.Column="0" Grid.Row="1" AllowDrop="true" HorizontalContentAlignment="Str...

WPF 4 multi-touch drag and drop

I have a WPF 4 application where I have implemented Drag and Drop using the standard DragDrop.DoDragDrop approach, but Im doing it using touch instead of Mouse events. My XAML for my Grid (that Im dragging) is as follows: <Grid x:Name="LayoutRoot" ManipulationStarting="ManipulationStarting" ManipulationDelta="Manipulation...

In chrome my drag and drop Java applet doesn't get the drop events, does chrome not support that on Mac?

I have an applet that accepts files via drag and drop from the OS which works in every browser but Chrome. In chrome if you drag and drop a file from the OS chrome shows you the file in the browser, if you drop a .jpg for instance. Does Chrome not support drag and drop for Java in OS X? Thanks ...

How can I tell a shortcut from a file in a C# drag and drop operation?

I have a C# .NET 3.5 app that I have incorporated the DragDrop event on a DataGridView. #region File Browser - Drag and Drop Ops private void dataGridView_fileListing_DragDrop(object sender, DragEventArgs e) { string[] fileList = e.Data.GetData(DataFormats.FileDrop) as string[]; foreach (string fileName in fileList) { ...

Drag and Drop folder view cocoa

Hello, I need to make a drag and drop view in cocoa that will accept folders. I know it will use things like NSView and probably registerForDraggedTypes: (which I still am not sure how to go about using). Does anyone know how to get this working? Thanks in advance ...