PC Review Forums Newsgroups Microsoft DotNet Microsoft VB .NET Constraining Drag & Drop

Reply

Constraining Drag & Drop

 
Thread Tools Rate Thread
Old 12-09-2005, 08:19 PM   #1
Evan Stone
Guest
 
Posts: n/a
Default Constraining Drag & Drop


Is there a way that I can constrain my drag-n-drop operations from my app to
a single target application?

It was remarkably easy to get the drag-n-drop functionality going in the
first place, but I'd like to only allow people to drag items from my
application *only* to Word (for example), and not to other applications, and
I was wondering if that was even possible...

Thanks!

Evan Stone
Petaluma, CA, USA


  Reply With Quote
Old 13-09-2005, 02:46 AM   #2
Lloyd Dupont
Guest
 
Posts: n/a
Default Re: Constraining Drag & Drop

I don't know about only to word, but if you support only 'non-standart'
format, only your apps will be able to drag & drop between each others...

"Evan Stone" <NOrecombinantspamSPAAM@NOhotmailSPAAM.com> wrote in message
news:eToJm78tFHA.2392@tk2msftngp13.phx.gbl...
> Is there a way that I can constrain my drag-n-drop operations from my app
> to
> a single target application?
>
> It was remarkably easy to get the drag-n-drop functionality going in the
> first place, but I'd like to only allow people to drag items from my
> application *only* to Word (for example), and not to other applications,
> and
> I was wondering if that was even possible...
>
> Thanks!
>
> Evan Stone
> Petaluma, CA, USA
>
>



  Reply With Quote
Old 13-09-2005, 11:01 AM   #3
Oliver Sturm
Guest
 
Posts: n/a
Default Re: Constraining Drag & Drop

Evan Stone wrote:

>Is there a way that I can constrain my drag-n-drop operations from my app
>to
>a single target application?
>
>It was remarkably easy to get the drag-n-drop functionality going in the
>first place, but I'd like to only allow people to drag items from my
>application only to Word (for example), and not to other applications, and
>I was wondering if that was even possible...


I don't think it is. As Lloyd suggests, you could restrict the formats
that your application makes available, but I don't think there's a way to
restrict the target application. Certainly not an easy one... maybe you
could somehow, while a clipboard format is being requested, find out which
application you're talking to. I'm not sure that would work though, and it
would probably be extremly easy to work around if someone wanted to get
hold of the data that you intended to be only for Word - like rename
another app to winword.exe.


Oliver Sturm
--
Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)
  Reply With Quote
Old 13-09-2005, 09:33 PM   #4
Evan Stone
Guest
 
Posts: n/a
Default Re: Constraining Drag & Drop

> I don't think it is. As Lloyd suggests, you could restrict the formats
> that your application makes available, but I don't think there's a way to
> restrict the target application.


That's sort of what I figured, but I thought I'd better ask the question
nonetheless...

But seriously, trying to come up with an overly-complex solution to a
problem that really isn't that big of a deal to begin with would probably
just be overkill in the long run. I was just hoping there was something
simple that I was overlooking (which is usually the case).

The data that would be dropped on Word would not even be that useful in
other application contexts anyway, so in a discussion I had with someone
this morning, we came to the conclusion, "who cares where they drop it?"
(especially in a v1 product...)

Thanks for your help, guys!

evan k. stone
----------------------------------------
petaluma, ca, usa


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off