Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Drag&Drop over RichTextBox showing wrong DropEffect

Drag&Drop over RichTextBox showing wrong DropEffect

Scheduled Pinned Locked Moved C#
helptutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mav northwind
    wrote on last edited by
    #1

    Hi guys! I'm struggling with a weird problem I'm unable to solve so far. I want to enable drag&drop of mail attachments from Outlook. This does work when my drop target is, for example, a Form or a Panel; I can get all the file names and contents, no problem. As soon as I try the same with a RichTextBox as drop target, it doesn't work - whatever I set the desired DropEffect to (usually DropEffect.Copy), the cursor is always DropEffect.Move when dragging files from Explorer over the RTB (minor nuisance) and DropEffect.None if I drag mail attachments from Outlook (showstopper). It doesn't matter if I set the effect in DragEnter or DragOver, if EnableAutoDragDrop is true or false, I've even tried loading a Rich Edit control 4.1 instead of the default V2.0, but to no avail. Can anyone help? Thanks in advance!

    Regards, mav -- Black holes are the places where God divided by 0...

    X 1 Reply Last reply
    0
    • M mav northwind

      Hi guys! I'm struggling with a weird problem I'm unable to solve so far. I want to enable drag&drop of mail attachments from Outlook. This does work when my drop target is, for example, a Form or a Panel; I can get all the file names and contents, no problem. As soon as I try the same with a RichTextBox as drop target, it doesn't work - whatever I set the desired DropEffect to (usually DropEffect.Copy), the cursor is always DropEffect.Move when dragging files from Explorer over the RTB (minor nuisance) and DropEffect.None if I drag mail attachments from Outlook (showstopper). It doesn't matter if I set the effect in DragEnter or DragOver, if EnableAutoDragDrop is true or false, I've even tried loading a Rich Edit control 4.1 instead of the default V2.0, but to no avail. Can anyone help? Thanks in advance!

      Regards, mav -- Black holes are the places where God divided by 0...

      X Offline
      X Offline
      Xmen Real
      wrote on last edited by
      #2

      I think its windows inbuilt text effects... well, try this

      TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can

      M 1 Reply Last reply
      0
      • X Xmen Real

        I think its windows inbuilt text effects... well, try this

        TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can

        M Offline
        M Offline
        mav northwind
        wrote on last edited by
        #3

        Thanks, but what exactly do you mean by "windows inbuilt text effects"? It's not that I don't know how to handle drag&drop from outlook in general (it's working fine on non-RichTextBox controls as drop targets). The question is how to make the RTB appreciate the DragDropEffect I set in the DragEnter/DragOver events and not to tell the user that he can't drop an attachment there when I explicitely set the DragDropEffect to Copy.

        Regards, mav -- Black holes are the places where God divided by 0...

        X 1 Reply Last reply
        0
        • M mav northwind

          Thanks, but what exactly do you mean by "windows inbuilt text effects"? It's not that I don't know how to handle drag&drop from outlook in general (it's working fine on non-RichTextBox controls as drop targets). The question is how to make the RTB appreciate the DragDropEffect I set in the DragEnter/DragOver events and not to tell the user that he can't drop an attachment there when I explicitely set the DragDropEffect to Copy.

          Regards, mav -- Black holes are the places where God divided by 0...

          X Offline
          X Offline
          Xmen Real
          wrote on last edited by
          #4

          mav.northwind wrote:

          but what exactly do you mean by "windows inbuilt text effects"?

          that mean windows is handling that drag drop itself as text content...

          TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups