public static Point scrollListViewToIndex(IntPtr handle, int index) { if (Vip72Handle.ListView_GetItemCount(handle) <= index) { return(Vip72Handle.InvalidPoint); } Size windowSize = Vip72Handle.GetWindowSize(handle); Point listViewItemPoint = Vip72Handle.GetListViewItemPoint(handle, index); if (listViewItemPoint != Vip72Handle.InvalidPoint) { int num = 0; if (listViewItemPoint.Y > windowSize.Height - 25) { num = 1; } if (listViewItemPoint.Y < 25) { num = -1; } for (int index1 = 30; num != 0 && index1 > 0; --index1) { switch (num) { case -1: int wParam1 = 2; Vip72Handle.SendMessage(handle, 277U, wParam1, 0); break; case 1: int wParam2 = 3; Vip72Handle.SendMessage(handle, 277U, wParam2, 0); break; } listViewItemPoint = Vip72Handle.GetListViewItemPoint(handle, index); num = 0; if (listViewItemPoint.Y > windowSize.Height - 25) { num = 1; } if (listViewItemPoint.Y < 25) { num = -1; } } } return(listViewItemPoint); }