我的文件数据比较大,
大概有50000多行.
一行一行写到listBox里面以后,
最后需要用到listcount的值,
但是居然得了个负值.
仔细检查了一下,
发现从0到32767还是正常,
但是紧接着ListCount的值就变成了-32768
然后从-32768开始增加下去了,-32767,-32766,-32765.......
请教各位高手!
这到底是怎么回事?
急!
也恳请各位为我UP!!多谢多谢!!!
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 Private Const LB_GETCOUNT = &H18B '获取ListBox控件行数 Private Const LB_GETCURSEL = &H188 '获取ListBox控件当前选中第几行 Private Const LB_SETCURSEL = &H186 'ListBox控件设置选择第几行 Private Sub Command2_Click() Dim Count As Long Count = SendMessage(List1.hwnd,LB_GETCOUNT,0) End Sub Private Sub Command3_Click() dim id as long id = SendMessage(List1.hwnd,LB_GETCURSEL,0) End Sub Private Sub Command4_Click() call SendMessage(List1.hwnd,LB_SETCURSEL,200,0) End Sub