Drag and drop file in windows 8.1 possible?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Drag and drop file in windows 8.1 possible?

Post by Fangbeast »

I have enabled my web gadget with

EnableGadgetDrop(#MyWebGadget, #PB_Drop_Files, #PB_Drag_Copy)

But when I check with

Case #PB_Event_GadgetDrop

The operation seems to be forbidden. Has the webgadget ever had that ability? Help doesn't mention it specifically but I was hoping.

**Update** Been trying various bits of drag and drop from my old codes and forum examples and right now, I can't get a single example working on Windows 8.1 x64. They used to work under windows 7 x86. Using PB 5.21LTS x86

No idea what's going on (as usual LOL)

Must see if I can get a virtual machine going.

**Update**

Just installed a windows 7 x86 virtual machine and the same code that DOESN'T WORK on windows 8.1 WORKS FINE in that virtual machine. As do all the drag and drop examples.

P.S. The file browser from the File menu in the IDE cannot see the LIBRARY link in Windows 8.1 but it can in Windows 7

Hmm. Anyone else test drag and drop in Windows 8.1 to verify this? Don't want to do a bug report unless it's warranted.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 575
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Re: Drag and drop file in windows 8.1 possible?

Post by bembulak »

Do you want me to just the Drag and Drop Example that ships with PB, or do you have a specific one?
cheers,

bembulak
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Drag and drop file in windows 8.1 possible?

Post by luis »

I I've tried to launch the executable of a program I wrote in PB that use drag and drop, and it seems to works well under win 8.1.

I've also tried the PB D&D demo from the help, and it works.

I didn't try anything involving the webgadget.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Drag and drop file in windows 8.1 possible?

Post by Fangbeast »

bembulak wrote:Do you want me to just the Drag and Drop Example that ships with PB, or do you have a specific one?
Just try the standard one. It's windows 8.1 x64 that it fails on. Seems like a lot of things still don't work right on x64 bit windows for me and that's not just drag and drop in pb.

Now, 32 bit windows seem to be all right but I don't have a copy of 32 bit windows 8.1 to test to validate this claim.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Drag and drop file in windows 8.1 possible?

Post by Fangbeast »

luis wrote:I I've tried to launch the executable of a program I wrote in PB that use drag and drop, and it seems to works well under win 8.1.

I've also tried the PB D&D demo from the help, and it works.

I didn't try anything involving the webgadget.

Is your version of windows 8.1 x86 or x64 like mine?

Windows 7 x86, PB 5.21LTS X86, drag and drop works for me.
Windows 8.1 x64, PB 5.21LTS X86, drag and drop doesn't work for me.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Drag and drop file in windows 8.1 possible?

Post by luis »

Fangbeast wrote: Is your version of windows 8.1 x86 or x64 like mine?
Win 8.1 x64, the exe was x64 (compiled with PB 5.20) and the demo from PB was tested on PB 5.21 x86 and x64.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Drag and drop file in windows 8.1 possible?

Post by Fangbeast »

luis wrote:
Fangbeast wrote: Is your version of windows 8.1 x86 or x64 like mine?
Win 8.1 x64, the exe was x64 (compiled with PB 5.20) and the demo from PB was tested on PB 5.21 x86 and x64.
Then I don't know what's going on.

In win 8.1 x64, my PB is 5.21LTS X86, run or compiled, no drag and drop. Comodo Security Suite active.

In win 7.0 x86, my PB is 5.21LTS X86, run or compiled, drag and drop. Comodo Security Suite active.

Would it be possible for a firewall to block this action (I am trying to imagine if this would be considered a 'threat' by such a software.)?

Going to whitelist the entire PureBasic directory as well as my development directory so see if that makes a difference, but I don't see how/why.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Drag and drop file in windows 8.1 possible?

Post by Fangbeast »

Okay, the drag and drop example from the PB manual works.

However,

I can still *NOT* drop files from windows 8.1 X64's explorer onto a PB program window.

I can drop files from windows 7.0 X86's explorer onto a PB program window.

getting closer.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 575
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Re: Drag and drop file in windows 8.1 possible?

Post by bembulak »

Fangles wrote:I can still *NOT* drop files from windows 8.1 X64's explorer onto a PB program window.
Strange.

This is a stripped down version of the example that ships with PB. It works fine here, I can drop files from Windows Explorer and FreeCommander onto the list without any problems!

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
OS: Windows 8.1 x64
PB: PureBasic 5.21 LTS (Windows - x64)
cheers,

bembulak
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Drag and drop file in windows 8.1 possible?

Post by ts-soft »

Drag & Drop works only between programs with the same permission, like invoker, admin and so on. You should check that you use the right manifest and not a compatiblity-mode.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Drag and drop file in windows 8.1 possible?

Post by Fangbeast »

ts-soft wrote:Drag & Drop works only between programs with the same permission, like invoker, admin and so on. You should check that you use the right manifest and not a compatiblity-mode.
Didn't think about needing a manifest as this works in windows 7 without one. Just tested with a manifest in windows 8.1, no difference.

I feel Deja-Vu here, might have encountered this problem before but don't remember when.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Drag and drop file in windows 8.1 possible?

Post by Fangbeast »

bembulak wrote:
Fangles wrote:I can still *NOT* drop files from windows 8.1 X64's explorer onto a PB program window.
Strange.

This is a stripped down version of the example that ships with PB. It works fine here, I can drop files from Windows Explorer and FreeCommander onto the list without any problems!
This is driving me bonkers, not working here.

OS: Windows 8.1 x64
PB: PureBasic 5.21 LTS (Windows - x86)
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: Drag and drop file in windows 8.1 possible?

Post by em_uk »

I have found that sometimes if you have ran PB as admin, drag and drop wont work from a users location.

Creating an exe then running under normal rights works fine. Hit and miss, I never complain about it just find a way round.
----

R Tape loading error, 0:1
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Re: Drag and drop file in windows 8.1 possible?

Post by Sparkie »

Fangles, are you able to drag/drop a text file from Win Explorer to Win Notepad?
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Drag and drop file in windows 8.1 possible?

Post by Fangbeast »

Sparkie wrote:Fangles, are you able to drag/drop a text file from Win Explorer to Win Notepad?
No oh great wizard!!!

I am trying to drop files from Windows 8.1 x64's file explorer onto a pb 5.21lts x86 window.

This worked on windows 7 x86 (never tried it with windows 7 x64).

Using the example from the pb help file, files don't drop in that either in win 8.1 x64 but it does work in win 7 x32.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Post Reply