Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

Drag & Drop direct access in win7

$
0
0
I have an app that works for winXP,

it has a textbox where you can drop there a direct access from desktop


then it pickup its data with

Code:

Private Sub TextDirectAcess_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim LnkFile As String
Dim myShell As New WshShell
Dim myShortcut As WshShortcut
Dim PathFile As String, Icon As String, params As String
Dim XI As Integer, II As Long, Name As String

On Error GoTo Err
LnkFile = Data.Files(1)

Set myShortcut = myShell.CreateShortcut(LnkFile)

' Extrae parámetros.
PathFile = myShortcut.TargetPath
params = myShortcut.Arguments
Icon = myShortcut.IconLocation
 ....


But, in win vista/seven (don't try in win8 yet), well, in those O.S. when you are doing the DROP it shows the prohibited mouse icon, so you can't actualy do the drag&drop operation.

in the object OLEDropMode = Manual , that in Win XP is the property that allows to run that code.

WHY is this? what changed?.

Viewing all articles
Browse latest Browse all 21273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>