Hello,
I'm trying to solve the following problem using a listview:
I have a list of items with a state for each (say installed/not installed). The user must be able to see the state of each item in the list (I use the checkbox property). When the user selects one item he gets (among others) the option of intalling/not installing.
I used at first a simple Lixtbox, but the highlighting of a checked item is confusing the simple selection of an item (in other words, it's hard for the user to understand what the list does because the highlighting of checked items is stronger than the highlighting of a selected item). Since I could read everywhere that you can't change that behavior in a listbox, I moved to a ListView control.
Now what I want to do is prevent all the extra functions of the listview (I don't want drag&drop, sorting...). I could find some code (http://www.devx.com/vb2themax/Tip/18444) to do that, but it fails at subclassing my form :
FormHook.StartSubclass Me gives a runtime error 438.
Could it be that this MsgHook class is not vba compatible? If that's not the case, any hint on how why it's not working?
EDIT : actually, I managed to get some progress. The form (represented by Me) didn't expose its handle. So I worked around with FindWindow to directly supply the handle. Now the issue I have is that the window message I expected to be thrown as indicated in the code I found isn't... I did a bit of spying on the messages, but there doesn't seem to be any drag & drop related message at any time. I could identify a click and a selected event, but nothing else...
Thanks in advance
Bookmarks