Click to See Complete Forum and Search --> : Drag and drop applications in C#


Nightfox
April 29th, 2003, 12:26 AM
Is it possible to drag and dropp applets onto a Windows form so that you could run them from a toolbar?

pareshgh
April 29th, 2003, 02:37 PM
which applets are you talking about.
C# or Java.

what do you want to run from toolbar. elaborate your question.


Paresh

Nightfox
April 29th, 2003, 04:34 PM
I need to have a toolbar done in C#, which will run applets, also done in C#.

Eric

pareshgh
April 29th, 2003, 04:37 PM
what sort of applets you are talking about.

pareshgh
April 29th, 2003, 05:39 PM
maybe you check out link (http://gotdotnet.com/community/messageboard/Thread.aspx?id=91339&Page=1#91810)

Paresh

Nightfox
April 30th, 2003, 12:09 AM
These applets would be other programs written in C#.

pareshgh
April 30th, 2003, 11:41 AM
ah ! I see now. you could have clarified that earlier. those are known as Controls or Custom User Controls. and not the Applet. the applet word is usually used for Internet world that's what I believe.
anyways...


now plz explain your problem further.

-Paresh

Nightfox
April 30th, 2003, 11:58 AM
My question is, how do you enable dragging and dropping for a form/control? I enabled the AllowDrop property, but I still cannot drag and drop something onto my control. What I would like to do is to create custom user controls and then be able to drag them from Explorer onto my application and have them added to a control and have the custom control's icon appear on a button so it can be launched. Is this posslble, or is that a little bit of a stretch?

Eric

pareshgh
April 30th, 2003, 12:16 PM
Hi,

If I am reading you correctly then,

My question is, how do you enable dragging and dropping for a form/control?

>> typically you will need 2 controls for drag-drop.
1) Source Control
2) Destination Control

now if you want to support the drag-drop operations then you will need to set Destination's AllowDrop property.

further you will need to handle drag-drop events. where you create the source object in drag region and then drag it on the destination control.


I enabled the AllowDrop property, but I still cannot drag and drop something onto my control.

>> As, I said earlier you will need to handle the events for that. you can look in samples (if you want i can pass it to you
;) )


What I would like to do is to create custom user controls and then be able to drag them from Explorer onto my application and have them added to a control and have the custom control's icon appear on a button so it can be launched

>> so does that mean you are doing something like draging files on your control from the windows explorer.

if not then,

when you create controls it will create a dll , you will need to reference it or add it in toolbox.
so that you can drag that control for further use.