We help IT Professionals succeed at work.

How to get Files/folders Sort order in Windows Explorer window in C#?

YazArch
YazArch asked
on
1,524 Views
Last Modified: 2013-12-17
Hello,

Is there a way to get the sort order for files and folders in a windows explorer window?

P.S: i can get the Hwnd, but how to get the sort order?

Thanks.
Comment
Watch Question

Aaron JabamaniTechnical Architect

Commented:
Interesting requirement, but looks like there is no api of help now.

Directory class members of no help.

Author

Commented:
Thanks,

Interop.Shell32 has ShellFolderViewinterface which has ShellFolderViewClass which contains the SortColumns property, but how to retrieve that object from an Hwnd??
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.