Determine if a folder is clicked/selected in windows Explorer
I wish to be able to detect if a 'secured' folder is selected/clicked so that I can ask for a password to 'open' the folder, can anyone give me a hint on where or what to look for?
Been trying to google but I am not finding anything useful in my case.
TIA
Re: Determine if a folder is clicked/selected in windows Explorer
you can loop through all the open shell windows and return the locationurl, which would be in the format of
file:///C:/test
change the foldername to suit, probably use ucase or lcase to match strings
i assume you would need to do this in a timer
i am not sure if the correct locationurl would be returned for a folder that the user can not open
Re: Determine if a folder is clicked/selected in windows Explorer
Re: Determine if a folder is clicked/selected in windows Explorer
Dee-u
I'm a little confused by your chain of events.
Correct me where I went wrong..
- Your VB6 app is running
- You then go to Windows Explorer and click on a folder
- You want your app to detect which folder was just clicked and prevent
it from manually being opened if the folder is 'secured' (in which case you
would ask for a password)
Spoo
Re: Determine if a folder is clicked/selected in windows Explorer
Quote:
Originally Posted by
dee-u
I wish to be able to detect if a 'secured' folder is selected/clicked so that I can ask for a password to 'open' the folder, can anyone give me a hint on where or what to look for?
You can implement a Shell notify (subclassing is need), see this project:
http://btmtz.mvps.org/shnotify/
1 Attachment(s)
Re: Determine if a folder is clicked/selected in windows Explorer
Quote:
Originally Posted by
gibra
That is cool but I cannot find what event is raised when we selected a folder in Windows Explorer. :(
EDIT:
Upon removing a user's access to a folder and when we try to click on that folder the following dialogbox (attached) is shown, perhaps there is a way to trap for its showing, cancel it and show my own form instead?
Re: Determine if a folder is clicked/selected in windows Explorer
Quote:
Upon removing a user's access to a folder and when we try to click on that folder the following dialogbox (attached) is shown, perhaps there is a way to trap for its showing, cancel it and show my own form instead?
while that dialog is showing the readystate for that shell window remains at readystate_loading, don't know if that is any help?