Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Operating shortcuts from elshelllist

1. If file explorer is not set up to see .lnk extensions then copying or moving the file is difficult since it tells you the file is not available and the getfullname procedure does not include the extension.  (you need to set up the File explorer view in Control panel).
2. If you double click on a lnk file it will run an exe file ok.  or open Word if a link to a doc file is clicked so that works.
3.  If the lnk is to another folder it should move to that folder within the elshelllist component but it actually opens file explorer instead which is annoying.  Is there any way of preventing File Explorer from opening?  I cant catch it with DblClick - the procedure starts but File Explorer has already opened.  If I can stop it I can program a move in Elshelllist to the new folder.

Comments

  • 8 Comments sorted by Votes Date Added
  • edited January 2020 Posts: 0 Accepted Answer Vote Up0Vote Down
    You can set AutoExecute property to False, and implement double-click action yourself for all files. To get an idea of how it implemented inside our controls, you can look at TElShellList.MouseLButtonDblClickItem source code.
  • Tried that but it does mean making provision for every eventuality.  Double click works perfectly (so far as I have found anyway) apart from the link to a folder.  (and it still cannot find the file as a link file without doing No. 1 above).  I've got round it by closing the FileExplorer window while giving the link folder details to the Elshelllist so I only test for that while leaving Doubleclick to continue doing what it does.
  • But the code in TElShellList.MouseLButtonDblClickItem is not so long. I think my advice of disabling AutoExecute make sense.
  • Havent got TElShellList.MouseLButtonDblClickItem.  However using Ondoubleclick and with Autoexecute off I can write routines to do all the usual things BUT when you doubleclick on a normal folder it doesn't immediately go to OnDoubleClick.  Instead it changes to the new folder, selects the first item and THEN goes to on doubleclick.  So if the top item in the new folder is an exe file it runs it!
  • If the top item is a folder it opens that as well via the routines written on Ondoubleclick.   You need to switch off AutoNavigate to take total control. I think that since it uses the doubleclick routine to change folders it then doesn't repeat for the top item
  • edited January 2020 Posts: 0Vote Up0Vote Down
    I can an appropriate event for you, but then you'll have to wait for the next minor release unless you have access to LMD GIT. Something like:

    OnExecute(Sender; Item; var Handled);

    Ok?
  • Sounds great thanks.
  • OnExecute event has been added.
Sign In or Register to comment.