Results 1 to 2 of 2

Thread: Adding "Check All" to ListView with checkboxes

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    18
    Hi Guys..

    Do any of you know how to add a "Check All" option to a Listview with check boxes ?

    Really appreciate your help.

    Hemang

  2. #2
    Hyperactive Member
    Join Date
    May 1999
    Location
    Reynosa, Mexico
    Posts
    274
    If your ListBox names List1, just Add the following code into the correct places (indicated in the commented lines).

    Code:
    'In the General Declarations
    Private Declare Function SendMessageLong Lib _
            "user32" Alias "SendMessageA" _
            (ByVal hwnd As Long, _
            ByVal wMsg As Long, _
            ByVal wParam As Long, _
            ByVal lParam As Long) As Long
    
    Public Const LB_SETSEL = &H185&
    
    'Into a CommandButton Click event or something you want
    Call SendMessageLong(List1.hwnd, LB_SETSEL, True, -1)
    I hope this can helps you. Good Look!
    Ulises Vázquez
    [size=1.7]Oracle DBA Certified Professioanl
    Visual Basic 6 Developer
    Crystal Reports Designer
    [/size]

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