Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Drag and Drop over ListView Control problem. VFP 6.

49 views
Skip to first unread message

Demetrios Panayotakopoulos

unread,
Jan 6, 2001, 5:34:57 AM1/6/01
to
Hello and Happy New Year.

I am trying to drop a file on a ListView Control.
I pick a file from the desktop, drag it over the ListView Control.
I see that it accept's the file.
I drop it.
But after that I get the error message:
OLE error code blablabla: Invalid number of parameters

Any Help ?

Thanks

Demetrios

----------
I have set:

OLEDragOver:
*** ActiveX Control Event ***
LPARAMETERS data, effect, button, shift, x, y, state
if state <> 0
nodefault
return
endif

OLEDragDrop
*** ActiveX Control Event ***
LPARAMETERS data, effect, button, shift, x, y
local aFilesDropped(1)

if Data.GetFormat(15)
Data.getdata(15, @aFilesDropped)
endif

Demetrios Panayotakopoulos

unread,
Jan 6, 2001, 5:47:10 AM1/6/01
to
I forgot to mention that the erros appears on the line with the :
Data.getdata(15, @aFilesDropped)

Thanks again

"Demetrios Panayotakopoulos" <j...@hermes.civil.auth.gr> wrote in message
news:utTNvx8dAHA.1700@tkmsftngp03...

Andrew R

unread,
Jan 6, 2001, 6:19:34 AM1/6/01
to
Assuming that you are using the default parameters in the OLEDragDrop you
should be using:-

oDataObject.getData(15,@aArray)

aArray should be defined as an array already.

Andrew R.

--

QAITS

a...@qaits.co.uk
http://qaits.co.uk/

For support email sup...@qaits.co.uk
For sales email sa...@qaits.co.uk


"Demetrios Panayotakopoulos" <j...@hermes.civil.auth.gr> wrote in message

news:eetH$98dAHA.1700@tkmsftngp03...

Demetrios Panayotakopoulos

unread,
Jan 6, 2001, 10:44:55 AM1/6/01
to
Andrew,

I have it already defined.
I don not know why that happens.
The same code works on a text box.

Demetrios

"Andrew R" <ne...@qaits.co.uk> wrote in message
news:936usq$741$1...@news7.svr.pol.co.uk...

Trey Walpole

unread,
Jan 8, 2001, 11:00:06 AM1/8/01
to
Demetrios,
I've already replied to you directly, but for others looking in...

ActiveX controls work a little differently – the object that comes in as a
data object has a Files array, so instead of using GetData to populate the
array, go directly against the array, e.g.

** ListView.OLEDragDrop


*** ActiveX Control Event ***
LPARAMETERS data, effect, button, shift, x, y

If Data.GetFormat(15) and data.Files.Count > 0
For Each lcFile In Data.Files
? lcFile
EndFor
EndIf

lcFile will be the full path to the file.

"Demetrios Panayotakopoulos" <j...@hermes.civil.auth.gr> wrote in message
news:utTNvx8dAHA.1700@tkmsftngp03...

0 new messages