I'm trying to select all items of a ListView control.
I tried SendMessage as in this example: http://vbnet.mvps.org/index.html?cod...vselectall.htm but the program from which I'm trying to select the items crashes.
The handle of the ListView is good, I tested it by selecting some random items and then using LVM_GETSELECTEDCOUNT and seems to be fine.

How can this be done?