Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal _ hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As Long Const LVM_FIRST = &H1000 Const LVM_GETCOUNTPERPAGE = (LVM_FIRST + 40)
Function ListViewVisibleItems(lvw As ListView) As Long ListViewVisibleItems = SendMessage(lvw.hwnd, LVM_GETCOUNTPERPAGE, 0, _ ByVal 0&) End Function |