Click here to Skip to main content
13,353,106 members (62,117 online)
Rate this:
Please Sign up or sign in to vote.
How can i capture the file selected message in Windows Explorer?

on desktop or in windows explorer if a file or a folder's (or something else with a icon ) status is selected,then show a messagebox and print it's full name?

if multiple selected print all of them?
suppose I have the Explorer Window handler.


[edit]unnecessary code block removed[/edit]
Posted 16-Nov-12 20:14pm
Updated 17-Nov-12 14:36pm
Sergey Alexandrovich Kryukov 17-Nov-12 22:04pm
What is "files selected message" and "message" in general? What does it mean its "selection"?
ohsorry 17-Nov-12 22:51pm
files selected message,for instance,you click a file in your Explore window,then the file is i make myself clear?maybe not a message,a event?
Sergey Alexandrovich Kryukov 17-Nov-12 22:59pm
If you mean the Explorer application, the one ready-to-use, bundled with Windows, you can write some application which can be registered as Shell extension; then it will be always working not just with Explorers, but with any Shell-based alternative file managers, which is very important. The problem though is: I don't think the selection itself is the even you can hook. But you can add items to context menu and handle menu items. Besides, you can just register a file type, so some your application will be executed as "Run"...
ohsorry 17-Nov-12 23:11pm
Sergey Alexandrovich Kryukov,thank you very you said,i will try to write some contextmenu shell extentsion.but i still want do this,when i click a file in Explorer window,immediately show a messagebox print the file's full name.any way i can do this?i'v read this article Querying information from an Explorer window:
but i can not translate it to C#.
In Window 7,there is a detail bar in the bottom of Explorer window,when user select a file,the bar will show some more detail information about the file.
that is exactly what i want to do.
I doubt you can do it: a single click just selects. You can do it on double click. Besides, you don't really want to handle a single click: it will disrupt standard UI behavior.
ohsorry 18-Nov-12 0:55am
i don't need to handle single click.i just need to query the selected file name from Explorer's syslistview32 control.
Sergey Alexandrovich Kryukov 18-Nov-12 11:02am
On what event? I guess this is the only issue now...
ohsorry 18-Nov-12 19:57pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180111.1 | Last Updated 17 Nov 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100