using System.Runtime.InteropServices;
private const int GWL_STYLE = -16;
private const int LVS_SINGLESEL = 0x0004;
[DllImport("coredll")]
private static extern IntPtr GetCapture();
[DllImport("coredll")]
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("coredll")]
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int
dwNewLong);
// To toggle to multiselect for "listView1":
this.listView1.Capture = true;
IntPtr hWnd = GetCapture();
this.listView1.Capture = false;
int style = GetWindowLong(hWnd, GWL_STYLE);
SetWindowLong(hWnd, GWL_STYLE, (style & ~LVS_SINGLESEL));
... for more Win32 API support you should check out
http://www.opennetcf.org/winapi.asp
--
Tim Wilson
.Net Compact Framework MVP
{cf147fdf-893d-4a88-b258-22f68a3dbc6a}
Sebastian said:
How should i invoke the underlying control. i am an beginner of .net cf
You could PInvoke to change the underlying control behavior or you could
use
the ListView's Checkboxes property to simulate multiselection.
--
Tim Wilson
.Net Compact Framework MVP
{cf147fdf-893d-4a88-b258-22f68a3dbc6a}
Hello,
how can i make a listview that allows to select more than one