
Originally Posted by
manavo11
Can you post your code?
Here is the complete latest code. I just followed what u suggested in previouse posts:
VB Code:
Const LVIF_STATE As Long = &H8
Const LVIS_SELECTED As Long = &H2
Const LVIS_FOCUSED As Long = &H1
Const LVM_SETITEMSTATE As Long = (LVM_FIRST + 8)
Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" ( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByRef lParam As Any) As Long
Private Sub Command1_Click()
With myLVitem
.mask = LVIF_STATE
.state = &HF
.stateMask = LVIS_SELECTED Or LVIS_FOCUSED
End With
dmWriteProcessData lvItemPointer, VarPtr(myLVitem), Len(myLVitem)
apiResult = SendMessage(lvWindow, LVM_SETITEMSTATE, 1, lvItemPointer)
End Sub