Hi,
Iam trying the following code for searching a ListBox Control.
VB Code:
Const LB_FINDSTRING = &H18F Private Declare Function SendMessage Lib "User32" _ Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As _ Integer, ByVal wParam As Integer, lParam As Any) As Long iListIndex = SendMessage(m_listOfChangedDO.hWnd, LB_FINDSTRING, -1, ByVal strName(i))
If I do a sample application, Iam getting the result correctly, but if I include this code in my application it crashes saying an error:
VB6 caused a general protection fault
in module USER.EXE at 000c:00003ebb
Is there something wrong here? Or is there any better way to search a string in a ListBox?
Thanks,
Pres/.




Reply With Quote