Drag & Drop Issue

Just starting out? Need help? Post your questions and find answers here.
PoorMan
User
User
Posts: 15
Joined: Sat Oct 14, 2023 2:54 pm

Drag & Drop Issue

Post by PoorMan »

Good Morning Everyone ...
Here is a 'Drag & Drope' Simple Code.
It works fine, however, if you check the option "Request Administrator mode for Windows Vista and above", then the Drag & Drop functionality will not
Any help will be much Appreciated.

Code: Select all

If OpenWindow(0, 0, 0, 300, 100, "Drop File Here", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  StringGadget(0, 10, 10, 300 -20, 30, "", #PB_String_ReadOnly)
  EnableGadgetDrop(0, #PB_Drop_Files, #PB_Drag_Copy)
  
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_GadgetDrop
        Select EventGadget()
          Case 0 ; gadgets that received a file/folder drag and drop event
            If Not FindString(EventDropFiles(), Chr(10))
              SetGadgetText(0, EventDropFiles())
            EndIf
          Case 1
            SetGadgetText(1, EventDropFiles())
        EndSelect
        
      Case #PB_Event_CloseWindow
        CloseWindow(0)
        End
    EndSelect
  ForEver
EndIf
Image
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Drag & Drop Issue

Post by HeX0R »

You have to blame Windows, see e.g.:
https://superuser.com/questions/59051/d ... inistrator
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Re: Drag & Drop Issue

Post by chi »

Use the forums search: "drag drop admin", there are plenty of solved posts ;). But you have to use WinAPI...
Et cetera is my worst enemy
EaxVal
User
User
Posts: 14
Joined: Thu Sep 12, 2024 2:00 pm

Re: Drag & Drop Issue

Post by EaxVal »

Hi,
I tested this on both environments and can tell that this issue appears in the x86 structure only!
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: Drag & Drop Issue

Post by AZJIO »

Post Reply