[dba-VB] VB6: TreeView Controls and Drag-N-Drop

Drew Wutka DWUTKA at marlow.com
Mon Feb 24 11:25:48 CST 2003


I have a drag and drop treeview setup.  I can send the form so you can see
the code if you want.  The app itself would be a pain to try to setup for
just that example.  What it is, is a 'control' window I have that has a
'client' app on every machine in my company.  Then we admins (The IS
department) can open this control form for any user that is online.  It has
all sorts of bells and whistles, however, there is one tab that has a
'Windows Explorer' like set of treeviews.  It then doubles that set, to
display the local machine.  (So the top two are the remote user, and the
bottom two are the local user).  You can then 'drag and drop' files between
the two.

Let me know if you want me to send you the form I am talking about.

Drew

-----Original Message-----
From: Gregory K. Hazzard [mailto:ghazzard at aelfen.net]
Sent: Sunday, February 23, 2003 8:37 AM
To: 'Visual Basic Mailing List'
Subject: [dba-VB] VB6: TreeView Controls and Drag-N-Drop


Since John was so concerned about the lack of information freely flowing
about this list, I thought I'd get something started that's been
puzzling me for nigh on a week now.

I'm building a VB app that has a TreeView control (tvwDirectoryList) and
a File List Box (filFileList).  What's been puzzling me is that there
isn't a lot of information on TreeView controls for VB6 and I'm having a
deuce of a time trying to figure out how to get drag and drop to work.
I want to be able to drag files from the file list to different folders
in the tree view, and while I found the properties to turn on to make
the TreeView a drop target, and make the file list willing to let you
drag items from it, that's as far as I have been able to get.  I can
click on a file, and drag it across, and I get the drag icon (that
little greyed out box) but it doesn't actually select anything in the
TreeView to drop the file on, and when I release the mouse button, no
dropping occurs.

Does anyone have any documentation or an example or even a will guess
about how this should occur?  Thanks.


Gregory K. Hazzard
http://www.aelfen.net
mailto:ghazzard at aelfen.net
"I'm not saying it's safe for humans. I'm not saying it's unsafe for
humans.
 All I'm saying is it that it makes hermaphrodites out of frogs." 
- Tyrone B. Hayes of the University of California at Berkeley, on the
effects of Atrazine on human beings.



_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com



More information about the dba-VB mailing list