主题:Listbox中listindex最大值
zkyyp
[专家分:0] 发布于 2009-09-08 18:24:00
Listbox中listindex最大值为32767
我要加载的数据大于这个值!!
listcount和listindex属性都不可以用!!! 怎么解决啊!
回复列表 (共5个回复)
沙发
bcahzvip [专家分:6040] 发布于 2009-09-08 19:52:00
加载怎么多干什么?
板凳
singlion [专家分:690] 发布于 2009-09-10 13:03:00
既然是这么多条记录,就说明不是供用户浏览的,那么为何不考虑使用数组呢?
也许有一些地方数组不如list,那就用list数组……
或者放在数据库中
3 楼
我是大喊三 [专家分:3010] 发布于 2009-09-11 18:34:00
3万几个,你以为不用搜索你就能找出来吗,显示那么多有啥用.再多用表格控件分页显示
4 楼
tanchuhan [专家分:15140] 发布于 2009-09-11 20:44:00
[code=c]
Option Explicit
Private Const LB_GETCOUNT As Long = &H18B
Private Const LB_GETCURSEL As Long = &H188
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
Private Sub Command1_Click()
Debug.Print "ListIndex", SendMessage(List1.hwnd, LB_GETCURSEL, 0, ByVal 0)
Debug.Print "ListCount", SendMessage(List1.hwnd, LB_GETCOUNT, 0, ByVal 0)
End Sub
Private Sub Form_Load()
Dim i As Long
For i = 0 To &H10000
List1.AddItem i
Next
End Sub
[/code]
5 楼
justme123x [专家分:10] 发布于 2009-09-12 14:16:00
我呵呵笑了
http://www.hj175.com
我来回复