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 


Add Drag and Drop to VDSExplorer sample

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code
View previous topic :: View next topic  
Author Message
NathanH
Valued Newbie


Joined: 05 Sep 2001
Posts: 31

PostPosted: Thu Jul 31, 2003 8:54 pm    Post subject: Add Drag and Drop to VDSExplorer sample Reply with quote

Just for fun, here is some code to add Drag and Drop (IE Shortcuts and HTML files) to the VDSExplorer sample that came with VDS5.

Code:
TITLE DragDrop Example
  #DEFINE COMMAND,BROWSER
  #DEFINE FUNCTION,BROWSER
  external vdsbrw50

  DIALOG CREATE,Demo DragDrop,-1,0,560,400,DRAGDROP
  DIALOG ADD,BROWSER,BROWSER1,2,2,555,395,about:Drag and Drop HTML files and IE Shortcuts here...
  DIALOG SHOW

:EVLoop
WAIT EVENT
GOTO @event()

:DRAGDROP
list CREATE,1
list DROPFILES,1
IF @EQUAL(@UPPER(@EXT(@ITEM(1))),URL)
  GOSUB URL
END
IF @EQUAL(@UPPER(@EXT(@ITEM(1))),HTM)
  GOSUB HTML
END
IF @EQUAL(@UPPER(@EXT(@ITEM(1))),HTML)
  GOSUB HTML
END
LIST CLOSE,1
GOTO EVLoop

:URL
INIFILE OPEN,@ITEM(1)
%%URL = @INIREAD(InternetShortcut,URL) 
INIFILE CLOSE
 IF @NOT(@NULL(%%URL))
    DIALOG SET,BROWSER1,%%URL
 ELSE
    WARN Shortcut did not contain a valid URL
 END
EXIT

:HTML
   dialog set,BROWSER1,@ITEM(1)
EXIT

:CLOSE


Nathan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code 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