Results 1 to 40 of 4199

Thread: CommonControls (Replacement of the MS common controls)

Threaded View

  1. #11
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: gridlines hide the pixels ot the first column of a subitem icon

    VBCCR 1.7.47 & VB6SP6

    Hi Krool,

    i use the listview in report mode with 6 columns.

    Some user get error "9 - Subscript out of range" at the line "If xItem.ListSubItems(4).Tag = 0 Then" in the mouse move event.

    How is this possible if i use a "select case" with "case 4"?

    The error occurred on Windows 10 (Build 19045). I cant reproduce this error myself.

    Check my code:

    Code:
    Private Sub lvwSource_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    
    Dim subItemIndex As Long
    Dim xItem As VBCCR17.LvwListItem
    
    Set xItem = lvwSource.HitTest(X, Y, subItemIndex)
    
    If xItem Is Nothing Then
     ...
    Else
             
     Select Case subItemIndex
     Case 0
      ...
     Case 4
      If xItem.ListSubItems(4).Tag = 0 Then
       ...
      Else
       ...
      End If
     End Select
    
    End If
    
    End Sub
    Last edited by Mith; Feb 15th, 2023 at 08:57 PM.

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