Simple drag/drop in VB.Net 2k5 under Vista?

S

Steve Bottoms

Hi, all! Using VB .Net 2k5 under Vista Business...

I'm trying to put together a very basic drag-and-drop for file
copying, and can't seem to get DragDrop events (Form, PictureBox,
TextBox, etc) to fire at all, and DragEnter only fires if the drag
operation STARTS on the form (kinda defeating the purpose of a
drag-and-drop file copier). Is there some trick to getting it to
work? I've tried several different samples from MSDN and this forum,
and still no-go. Regardless of whether I'm dropping on a form or
control (yes, I'm certain the AllowDrop properties are set to TRUE),
any attempts to drop from outside the main Form only displays the
slashed-circle cursor (can't drop). Event handlers for DragEnter and
DragDrop have been created and implemented per examples, but still
nothing.

Suggestions? Ideally I want to use something like a PictureBox, but
after having read that MS says PictureBox wasn't intended to be used
like this, I'm sticking to just implementing the code at the Form
level (I can pretty it up later).

Thanks!
Jack
 
J

Jan Hyde (VB MVP)

Steve Bottoms <[email protected]>'s wild
thoughts were released on Fri, 01 Feb 2008 13:39:49 -0800
bearing the following fruit:
Hi, all! Using VB .Net 2k5 under Vista Business...

I'm trying to put together a very basic drag-and-drop for file
copying, and can't seem to get DragDrop events (Form, PictureBox,
TextBox, etc) to fire at all, and DragEnter only fires if the drag
operation STARTS on the form (kinda defeating the purpose of a
drag-and-drop file copier). Is there some trick to getting it to
work?

Are you running the IDE 'as administrator'?

The reason I ask is you cannot drag and drop between things
with different levels of access.

Try running the compiled version.

J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top