Page 2 of 5
Re: Drag and drop file in windows 8.1 possible?
Posted: Fri Jan 31, 2014 3:43 pm
by Sparkie
Fangbeast wrote:Sparkie wrote:Fangles, are you able to drag/drop a text file from Win Explorer to Win Notepad?
...
I am trying to drop files from Windows 8.1 x64's file explorer onto a pb 5.21lts x86 window.
I get that part Fangles. I'm just trying to establish if it's a PB related issue or more of a Windows related issue.
I have the same setup as you with Windows 8.1 x64 and PB 5.21lts x86, and have no issues with drag/drop.

Re: Drag and drop file in windows 8.1 possible?
Posted: Fri Jan 31, 2014 9:04 pm
by Fangbeast
I get that part Fangles. I'm just trying to establish if it's a PB related issue or more of a Windows related issue.
I have the same setup as you with Windows 8.1 x64 and PB 5.21lts x86, and have no issues with drag/drop.
Oi!! None of that winking, my wife will have words with me!!!
I think I will just bash myself around the head with a big rock as 2 days of 41 degrees are coming up and I won't be able to think my way out of anything!
Re: Drag and drop file in windows 8.1 possible?
Posted: Fri Jan 31, 2014 9:09 pm
by RASHAD
@Fangles
Take it easy
Try PB 5.11 x86 - x64 I think everything will go fine
Can not say more

Re: Drag and drop file in windows 8.1 possible?
Posted: Fri Jan 31, 2014 9:33 pm
by Fangbeast
RASHAD wrote:@Fangles
Take it easy
Try PB 5.11 x86 - x64 I think everything will go fine
Can not say more

Okay, will do. Will report back if I am not a squishly pile of melted sludge!!!
*EDIT* Just tried 5.11x86, no difference. Used the example given to me blow, as simple as it gets. Wondering if my stoopid firewall/sandbox/antivurs comboo is the problem some how.
Code: Select all
EnableExplicit
#Window = 0
Enumeration ; Gadgets
#TargetFiles
EndEnumeration
Define Event, Count, i
Define Files$
If OpenWindow(#Window, 0, 0, 800, 600, "Drag & Drop", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
; Create the target gadgets
ListIconGadget(#TargetFiles, 5, 5, 7900, 590, "Drop Files here", 250)
; Now enable the dropping on the target gadgets
EnableGadgetDrop(#TargetFiles, #PB_Drop_Files, #PB_Drag_Copy)
Repeat
Event = WaitWindowEvent()
; Drop event on the target gadgets, receive the dropped data
;
If Event = #PB_Event_GadgetDrop
Select EventGadget()
Case #TargetFiles
Files$ = EventDropFiles()
Count = CountString(Files$, Chr(10)) + 1
For i = 1 To Count
AddGadgetItem(#TargetFiles, -1, StringField(Files$, i, Chr(10)))
Next i
EndSelect
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
End
Re: Drag and drop file in windows 8.1 possible?
Posted: Fri Jan 31, 2014 10:01 pm
by RASHAD
Try the next snippet with v5.21 & 5.11 and let me know the result
I wish the problem will be solved tonight for you to get some rest
Code: Select all
Procedure.s GetDropFile (*dropFiles, index)
buffer = DragQueryFile_ (*dropFiles, index, 0, 0)
For a = 1 To buffer: buffer$ + " ": Next
DragQueryFile_ (*dropFiles, index, buffer$, buffer+1)
ProcedureReturn buffer$
EndProcedure
#Window = 0
Enumeration ; Gadgets
#TargetFiles
EndEnumeration
Define Event, Count, i
Define Files$
If OpenWindow(#Window, 0, 0, 800, 600, "Drag & Drop", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
; Create the target gadgets
ListIconGadget(#TargetFiles, 5, 5, 7900, 590, "Drop Files here", 250)
DragAcceptFiles_(GadgetID(#TargetFiles), 1)
Repeat
Select WaitWindowEvent ()
Case #WM_DROPFILES
*dropped = EventwParam ()
num = DragQueryFile_(*dropped , $FFFFFFFF, temp$, 0)
f$ = ""
For files = 0 To num - 1
f$ + GetDropFile (*dropped, files) + Chr (13)
Next
AddGadgetItem(#TargetFiles,-1,f$)
DragFinish_(*dropped)
Case #PB_Event_CloseWindow
Quit = 1
EndSelect
Until Quit = 1
EndIf
End
Re: Drag and drop file in windows 8.1 possible?
Posted: Fri Jan 31, 2014 10:07 pm
by Sparkie
Fangbeast wrote:I get that part Fangles. I'm just trying to establish if it's a PB related issue or more of a Windows related issue.
I have the same setup as you with Windows 8.1 x64 and PB 5.21lts x86, and have no issues with drag/drop.
Oi!! None of that winking, my wife will have words with me!!!
I think I will just bash myself around the head with a big rock as 2 days of 41 degrees are coming up and I won't be able to think my way out of anything!
I'm not seeing any answer to my original question my dear Fangles. Get out of the heat, pour some cold water over your big head and then tell me.....Can you drag/drop a .txt file from Explorer to Notepad?

Re: Drag and drop file in windows 8.1 possible?
Posted: Sat Feb 01, 2014 4:09 am
by Fangbeast
I'm not seeing any answer to my original question my dear Fangles.
Sorry, I got distracted by the past images of srod abusing those poor sheep again. It's not something your forget with time.
Get out of the heat, pour some cold water over your big head and then tell me
What's cold water??? It's 36 today, back to 41 tomorrow. Then next week might kill me:)
Can you drag/drop a .txt file from Explorer to Notepad?
Yes sir, that works well.
Re: Drag and drop file in windows 8.1 possible?
Posted: Sat Feb 01, 2014 4:14 am
by Fangbeast
[quote="RASHAD"]Try the next snippet with v5.21 & 5.11 and let me know the result
I wish the problem will be solved tonight for you to get some rest
Well, that was a shocker. Your example works fine in 5.21 RASHAD, the PB example from the help file doesn't. Haven't tried 5.11 yet.
Funny that the help example works in windows 7 x64 but not in windows 8.1 x4 On the same hardware. (I just swap installed hard drives and also use virtualbox images)
That means my firewall/sandbox/antivirus software isn't at fault or yours would fail to as it's the raw API version of PB drag and drop right?
Re: Drag and drop file in windows 8.1 possible?
Posted: Sat Feb 01, 2014 4:18 am
by Sparkie
The questions are only going to get tougher from this point forward Fangles, so strap on your....ummmm......ahhhhhh.......oh nevermind, just hang in there best you can.
Maybe I missed it, but are you getting the proper drag/drop icon with no drop occurring or do you get the no drop icon (circle with diag line)?
Re: Drag and drop file in windows 8.1 possible?
Posted: Sat Feb 01, 2014 4:29 am
by Sparkie
Let's eliminate a few things:
Are you using PB IDE or JaPBe?
Are you compiling by pressing F5, or clicking the Compile icon?
Do you get same results if you create exe and run?
Now I know these may seem like silly questions, but I've had problems in the past (years ago) that were related to the above situations.
Re: Drag and drop file in windows 8.1 possible?
Posted: Sat Feb 01, 2014 8:10 am
by Fangbeast
The questions are only going to get tougher from this point forward Fangles, so strap on your....ummmm......ahhhhhh.......oh nevermind, just hang in there best you can.
Tougher?? TOUGHER??? OOOOh Nooo, say it isn't so oh ferret infested master of mayhem!! And, I shall hang on to the urrrg, arrrm, ungha, ahem, thingamajigamabob!
Maybe I missed it, but are you getting the proper drag/drop icon with no drop occurring or do you get the no drop icon (circle with diag line)?
Circle with diag icon.
Re: Drag and drop file in windows 8.1 possible?
Posted: Sat Feb 01, 2014 8:16 am
by Fangbeast
Let's eliminate a few things:
Srod's festering underpants?
Are you using PB IDE or JaPBe?
PB IDE
Are you compiling by pressing F5, or clicking the Compile icon?
Compiling by pressing F5
Do you get same results if you create exe and run?
Never created an EXE before so just did it now and same result.
Now I know these may seem like silly questions, but I've had problems in the past (years ago) that were related to the above situations.
They are not silly questions Sir Sparkasaurus, master of the magical sheep roundabout, this is Microsoft's platform we are dealing with after all. What works on Windows 7 was almost guaranteed not to work the same (if at all!!) on windows 8 and up.
Every bit of drag and drop code that I have tried works fine on my windows 7 x32.
Oh, the inhumanity!
Re: Drag and drop file in windows 8.1 possible?
Posted: Sat Feb 01, 2014 11:26 am
by srod
Did I hear someone slating my festering underpants?
That's not fair; they don't belong to me anymore. They got up and scarpered, last seen loitering around the ISS trying to hitch a lift into the nether-regions of beyond.
Talk about escaping from the frying pan and heading into the fire huh!

Re: Drag and drop file in windows 8.1 possible?
Posted: Sat Feb 01, 2014 1:09 pm
by Fangbeast
Did I hear someone slating my festering underpants?
Yes, the good quality stone slating stuff, not the cheap wooden ones. Although the festering does erode even the stone ones after a while.
That's not fair; they don't belong to me anymore.
Then why do I have an affidavit signed by you and witnessed by Jessica the dancing sheep? Ohh, you weren't quite awake and you could have signed anything at that point.
nether-regions of beyond.
Nether regions?? Oh, that image iss seared into my eyeballs now and I'll never sleep again!
Talk about escaping from the frying pan and heading into the fire huh!

Well, when you are speaking about nether regions and then mention fire, I keep thinking about that last Indian curry we had. Never needed the gas stove as I recall, not after that

Re: Drag and drop file in windows 8.1 possible?
Posted: Sat Feb 01, 2014 3:37 pm
by LuCiFeR[SD]
make sure you put two toilet rolls in the fridge for morning then Fangles
