Results 1 to 17 of 17

Thread: Select all in listview

Hybrid View

  1. #1
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Select all in listview

    Can you post your code?


    Has someone helped you? Then you can Rate their helpful post.

  2. #2
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Select all in listview

    Quote 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:
    1. Const LVIF_STATE As Long = &H8
    2. Const LVIS_SELECTED As Long = &H2
    3. Const LVIS_FOCUSED As Long = &H1
    4. Const LVM_SETITEMSTATE As Long = (LVM_FIRST + 8)
    5.  
    6.  
    7. Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" ( _
    8.      ByVal hwnd As Long, _
    9.      ByVal wMsg As Long, _
    10.      ByVal wParam As Long, _
    11.      ByRef lParam As Any) As Long
    12.      
    13. Private Sub Command1_Click()
    14. With myLVitem
    15.       .mask = LVIF_STATE
    16.       .state = &HF
    17.       .stateMask = LVIS_SELECTED Or LVIS_FOCUSED
    18.       End With
    19.      
    20.         dmWriteProcessData lvItemPointer, VarPtr(myLVitem), Len(myLVitem)
    21.         apiResult = SendMessage(lvWindow, LVM_SETITEMSTATE, 1, lvItemPointer)
    22. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width