2

Some users actually prefer to open/execute files on a single click and have configured their windows accordingly.

I need to access this information so i can mimic the behaviour in a custom ListBoxControl. However I havent got a clue where this setting could be stored.

Probably my english isnt good enough to search for the right term here. I suspect this to be accessable by wmi.

4
  • Are you asking that you want the user to click on an item in a ListBoxControl and take that as a sign to close the control and pull the data following (i.e. ListBox_OnClickEvent)? Nov 8, 2016 at 15:17
  • 3
    I think they're asking how to read the Single-click to open an item (point to select) option from the Folder Options->General
    – James
    Nov 8, 2016 at 15:21
  • Answer at bottom here may be of use : overclock.net/t/1418289/issue-with-double-click-to-open - though I have seen comments this may not work with all versions of Windows
    – PaulF
    Nov 8, 2016 at 15:28
  • @JamesBarrass Correct.
    – CSharpie
    Nov 8, 2016 at 16:14

1 Answer 1

0

This value is stored in the registry in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellState at fifth byte.

You can check if single click is set with this:

var value = Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\", "ShellState", null) as byte[];
var singleClick = value != null && (value[4] & 32) == 0;
1
  • 1
    Damn how could i forget about the registry. I will try it out tomorrow and mark this answer accepted if it works.
    – CSharpie
    Nov 8, 2016 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.