forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Drag and Drop to Folder or Desktop

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Thu Sep 11, 2003 7:17 pm    Post subject: Drag and Drop to Folder or Desktop Reply with quote

I want to be able to drag and drop a file from a VDS app to a folder or to the desktop. I am having a hard time getting it to work. Any Ideas?

Thanks

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Thu Sep 11, 2003 7:26 pm    Post subject: Reply with quote

A first look at the problem suggests it may be very difficult in VDS as you can't access anything as a object (again COM etc.)
But there may be workarounds ?

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Sep 12, 2003 2:18 am    Post subject: Reply with quote

I think I have some idea how this could be done though not the actual code to do it.
In your app you should use the GetKeyState API* under a timer or Repeat-Until so that you can know when the mouse button is down and up.(@mousedown() cannot do that as it is not a global function +buggy)
So on clicking your list(you can use a shift click using the same trick above) say you will copy the path of file to a variable and change the global cursor**.
Then when you release the mouse button use with @mousepos get the X and Y coordinates and feed the value to @winatpoint to get the handle of the window which should be of class #SysListView32. Get it's parent which should be of the class #CabinetWClass. Now you should cycle thorugh the child windows of the #CabinetWClass window (use handles you obtained using class will never work as all the folders have the same class (classname is to make sure you have hit on the right window and nothing else so prevent errors) using vds or API and match the one that belongs to Edit class. Now get the text of this window which is the path to copy/move your file and use VDS File commands to copy or move your file.
Cleanup: reset the cursor and delete thr item from the list etc to mark the end of the function.
All above is in XP. I don't know if class names are slighly different in win 9x which I hardly use if at all.

* and ** both things are implemented in my dialog designer assist and I remember it has source code(I mostly give source codes for users benefit)

Hope this helps. If U want to drop into a particular folder in the syslist view I fear that it needs a object oriented langauge.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Fri Sep 12, 2003 12:29 pm    Post subject: Reply with quote

Thanks for the info! Smile I'll give that a try.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Sep 12, 2003 2:13 pm    Post subject: Reply with quote

I think desktop should be easier since it has several unique identifiers.
Good Luck

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group