Page 2 of 2

Re: ExplorerListGadgets and actioning items

Posted: Sat Jun 26, 2021 1:08 am
by JHPJHP
Hi BarryG,

I resolved this in an earlier script.
If you have access to my downloads you should be able to find the solution in Windows Services & Other Stuff.
If not, and no one has posted working code before I'm in a position to look for myself, I'll follow up after I locate it.

Re: ExplorerListGadgets and actioning items

Posted: Sat Jun 26, 2021 1:41 am
by BarryG
JHPJHP wrote: Sat Jun 26, 2021 1:08 amIf you have access to my downloads you should be able to find the solution in Windows Services & Other Stuff
Hi JHPJHP, I took a look there but couldn't see anything obvious (to me)? What would it be called?

Re: ExplorerListGadgets and actioning items

Posted: Sat Jun 26, 2021 3:16 am
by RASHAD
Hi Barry
From your posted image it looks that there is something wrong with the imagelist
Try the next post and report
It may look that no icons but then we will be sure about the wrong imagelist

Code: Select all

OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(1, 0, 0, WindowWidth(0), WindowHeight(0), "D:\")


While WindowEvent():Wend

Repeat
  shellH = FindWindowEx_(GadgetID(1), 0, "Shell Embedding", 0)
  hShellViewWin = FindWindowEx_(shellH, 0, "SHELLDLL_DefView", 0);
Until hShellViewWin <> #Null And shellH <> #Null   
hDesktopListView = FindWindowEx_(hShellViewWin, 0, "SysListView32", 0);
;LoadFont(0,"Tahoma",16)
;SendMessage_(hDesktopListView,#WM_SETFONT,FontID(0),1)

hImg = ImageList_Create_(20, 20, #ILC_COLORDDB, 0, 0)
SendMessage_(hDesktopListView, #LVM_SETIMAGELIST, #LVSIL_SMALL,hImg)

SendMessage_(hDesktopListView, #LVM_SETVIEW, #LV_VIEW_DETAILS, 0)
              
Repeat
  Select WaitWindowEvent()
    Case #PB_Event_Gadget
      Select EventGadget()
        Case 1
          Select EventType()
         EndSelect
      EndSelect
    Case #PB_Event_CloseWindow
      End
  EndSelect
ForEver



Re: ExplorerListGadgets and actioning items

Posted: Sat Jun 26, 2021 4:36 am
by BarryG
With your code, my D: drive looks like below. And then if I try it with my C: drive, it also doesn't have icons.

And there's no dates shown in the "Date" column, either.

Image

Re: ExplorerListGadgets and actioning items

Posted: Sat Jun 26, 2021 6:49 am
by RASHAD
Hi BarryG
Too many things do not match with the normal settings
- Instead of Date Modified it's Date
- Tags Column added
I think it's another add on application like Icaros taking control over File Manager
Check your installed application

Maybe we can copy the imagelist when browsing c:\ then use it later with any other drive
But who can guarantee that C:\ imagelist is always OK

Re: ExplorerListGadgets and actioning items

Posted: Sat Jun 26, 2021 10:22 am
by BarryG
I don't have any third-party file managers installed. It's one of those weird things where C: works and D: doesn't. Both are partitions from the same SSD on my PC. I can live without it for now and put it on the back-burner for later reassessment.

Re: ExplorerListGadgets and actioning items

Posted: Sat Jun 26, 2021 10:38 am
by RASHAD
Use your default web browser to view c:\ and d:\ and report
I did that with Firefox and it's fine

Re: ExplorerListGadgets and actioning items

Posted: Sat Jun 26, 2021 10:58 am
by BarryG
RASHAD wrote: Sat Jun 26, 2021 10:38 am Use your default web browser to view c:\ and d:\ and report
I did that with Firefox and it's fine
My default browser is Firefox and it shows C: and D: like below.

C -> https://i.imgur.com/gktSa1Q.png
D -> https://i.imgur.com/pSBYyQs.png

When I try with Internet Explorer, it opens the drives in Explorer instead like this:

C -> https://i.imgur.com/Ma1U89E.png
D -> https://i.imgur.com/msUOmuo.png

So, a slightly different view which is likely causing the problem. But no, I'm not changing those views to suit my PureBasic app. Hehe.

Re: ExplorerListGadgets and actioning items

Posted: Mon Mar 20, 2023 11:31 am
by BarryG
BarryG wrote: Sat Jun 26, 2021 10:22 amI can live without it for now and put it on the back-burner for later reassessment
Here I am back again; reassessing the code after 1.5 years, lol.

My requirements have changed now... all I want is to use the following code to show only the files with extensions that I give it. So, maybe only ".txt" files, or maybe both ".jpg" and ".png" files. But it seems I can't give a file filter to the WebGadget?

And yes, I must use a WebGadget for the reason given in my first post in this thread.

Code: Select all

If OpenWindow(0, 0, 0, 1024, 768, "Files", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  WebGadget(0, 10, 10, 1000, 750, "file:///d:\") ; This is fine to show all files. :)
  ;WebGadget(0, 10, 10, 1000, 750, "file:///d:\*.txt") ; But this doesn't show TXT files. :(
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf