xsharp.eu • VO , drag drop .. drop() not firing why, small sample please, driving me crazy
Page 1 of 1

VO , drag drop .. drop() not firing why, small sample please, driving me crazy

Posted: Sat Aug 14, 2021 4:37 am
by Sherlock
Karl.......... from the past like 2002. VO question has me stumped.

I have tried DLG and DW and SetStyle and setEXstyle and SELF:EnableDragDropClient(TRUE)
I had code that used to work, a TEXTCONTROL on Dlg and would drag an XML/CSV file.
How to deal with after fine,,,,,, but I cannot from FileExplorer/Windows 10 drag a file to trigger the Drop()
Help anybody. Why it worked and stopped no idea. I see the [+] that the drag is working.
Tried VOPAD in samples.. dropping a file of anytime... Drop() not called.

don´t use oControl:setstyle(). you must use oControl:SetExStyle (), because
WS_EX_ACCEPTFILES is a extended style !

SELF:oCCPB_Drag:SetExStyle(WS_EX_ACCEPTFILES , TRUE)

also the line
>> SELF:EnableDragDropClient(TRUE)
isn´t necessary.

METHOD Drop( oEvent ) CLASS DtaBmp

? "Did we get to DROP().. yes"

SUPER:Drop ( oEvent )

REURN SELF

VO , drag drop .. drop() not firing why, small sample please, driving me crazy

Posted: Sat Aug 14, 2021 8:25 am
by g.bunzel@domonet.de
Phil,

if you started VO as an administrator, Drop() will not work in your application window.
Start VO without 'Admin' and you only need a SELF:EnableDragDropClient() in your window to receive a Drop().

To receive filename(s) from FileExplorer:

METHOD Drop (oDragEvent) CLASS tabMyWindow
LOCAL n AS DWORD
LOCAL cFile AS STRING

SUPER:Drop(oDragEvent)

IF oDragEvent:FileCount > 0
FOR n:=1 UPTO oDragEvent:FileCount
cFile := oDragEvent:FileName(n)
...

HTH

Gerhard Bunzel

VO , drag drop .. drop() not firing why, small sample please, driving me crazy

Posted: Sat Aug 14, 2021 8:26 am
by Karl-Heinz
Hi Phil,

wasn´t sure which Karl you meant, but finally i found my answer from 23.03.2002 !

no doubt: we´re getting older day by day ... but after changes upon changes we are more or less the same ;-)

regards
Karl-Heinz

VO , drag drop .. drop() not firing why, small sample please, driving me crazy

Posted: Sat Aug 14, 2021 9:48 am
by Sherlock
Gerhard

snip[ if you started VO as an administrator, Drop() will not work in your application window ]

Yet the Drag n Drop for bBrowser in IDE works... inconsistent behaviour.

Your a Life saver,, it works .. damn run as ADMINSTRATOR shortcut to VO.. then run app in IDE.
I would never had worked this out as I was only testing in the IDE.

Admin... No DROP message................ WHY ???

What else does not work as expected in ADMIN.?

Need a drink now..

Phil

VO , drag drop .. drop() not firing why, small sample please, driving me crazy

Posted: Sat Aug 14, 2021 9:50 am
by Sherlock
Karl [ the right one...<g> ]

Had done everything correctly, damn ADMIN...

Thanks all.

Phil

VO , drag drop .. drop() not firing why, small sample please, driving me crazy

Posted: Sat Aug 14, 2021 10:40 am
by Karl-Heinz
Hi Phil - one of the last battleships in service ;-)

Just for record - do you know what Geoff is currently doing ? somehow I miss his questionable contributions ;-)

regards
Karl-Heinz

VO , drag drop .. drop() not firing why, small sample please, driving me crazy

Posted: Sat Aug 14, 2021 10:50 am
by Sherlock
Geoff
Spoke to Geoff maybe 3 years ago at MicroSoft Tech something in Sydney. I think he had moved to C# /NET and telling me his son finished university.. something like that. Outside of that do not know. The good old days taking the "piss out of Geoff".. lots of fun. Remember working with a few in the background as Geoff was so anti-Linux. Published this fake story the NT kernel was decompiled and 60% Linux code. Just winding him up.

The irony today......... this might be true. Gold old days Stephen Quinn contribution. Said you better leave Goeff alone he is getting angry. Steve died like 8 years ago, battle with Diabetes. Reminded me when I was trying to work out this Drop() issue all the old faces. Shit.. Damn ADMIN.... got me that is 5 hours I will never get back.

Phil

VO , drag drop .. drop() not firing why, small sample please, driving me crazy

Posted: Sat Aug 14, 2021 11:52 am
by Karl-Heinz
Phil,

thanks for the update !

Be assured: i stll remember Steve Quinn and his valuable contributions ...

All the best Phil !

regards
Karl-Heinz