hi to all. i got code from one of the link:<a href="http://stackoverflow.com/questions/5934422/how-can-i-remove-the-checkboxes-from-individual-items-in-a-listview-control">http://stackoverflow.com/questions/5934422/how-can-i-remove-the-checkboxes-from-individual-items-in-a-listview-control</a>[<a href="http://stackoverflow.com/questions/5934422/how-can-i-remove-the-checkboxes-from-individual-items-in-a-listview-control" target="_blank" title="New Window">^</a>] this code will be for hideing check boxes in listview.. Private Const LVIF_STATE As Integer = &H8 Private Const LVIS_STATEIMAGEMASK As Integer = &HF000 Private Const LVM_FIRST As Integer = &H1000 Private Const LVM_SETITEM As Integer = LVM_FIRST + 76 <StructLayout(LayoutKind.Sequential, Pack:=8, CharSet:=CharSet.Auto)> _ Private Structure LVITEM Public mask As Integer Public iItem As Integer Public iSubItem As Integer Public state As Integer Public stateMask As Integer <MarshalAs(UnmanagedType.LPTStr)> _ Public lpszText As String Public cchTextMax As Integer Public iImage As Integer Public lParam As IntPtr End Structure <DllImport("user32.dll", CharSet:=CharSet.Auto)> _ Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByRef lParam As LVITEM) As IntPtr End Function ''' <summary> ''' Hides the checkbox for the specified item in a ListView control. ''' </summary> Private Sub HideCheckBox(ByVal lvw As ListView, ByVal item As ListViewItem) Dim lvi As LVITEM = New LVITEM() lvi.iItem = item.Index lvi.mask = LVIF_STATE lvi.stateMask = LVIS_STATEIMAGEMASK lvi.state = 0 SendMessage(lvw.Handle, LVM_SETITEM, IntPtr.Zero, lvi) End Sub last method like hide check box method , in that lvi.iItem=item.index; this iam getting error..i tried but not get it.. if anybody knows pls let me know... its very urgent for me..
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)