CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2003
    Location
    Beaverton, OR, USA
    Posts
    10

    Drag and drop applications in C#

    Is it possible to drag and dropp applets onto a Windows form so that you could run them from a toolbar?

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    which applets are you talking about.
    C# or Java.

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


    Paresh
    - Software Architect

  3. #3
    Join Date
    Apr 2003
    Location
    Beaverton, OR, USA
    Posts
    10
    I need to have a toolbar done in C#, which will run applets, also done in C#.

    Eric

  4. #4
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    what sort of applets you are talking about.
    - Software Architect

  5. #5
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    maybe you check out link

    Paresh
    - Software Architect

  6. #6
    Join Date
    Apr 2003
    Location
    Beaverton, OR, USA
    Posts
    10
    These applets would be other programs written in C#.

  7. #7
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    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
    - Software Architect

  8. #8
    Join Date
    Apr 2003
    Location
    Beaverton, OR, USA
    Posts
    10
    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

  9. #9
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    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.
    - Software Architect

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured