- 积分
- 3531
- 明经币
- 个
- 注册时间
- 2003-4-11
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2005-2-18 12:44:00
|
显示全部楼层
本帖最后由 作者 于 2005-2-18 17:23:34 编辑
我试着写了一个在ListBox中寻找字串,但不会弄它,请你或其他兄弟帮我改一下,谢谢先!!!谢谢尹凡超班!!!
Const LB_FINDSTRING = &H18F 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 Sub Textbox1_Change() ListBox1.SetFocus 'ListBox1.ListIndex = SendMessage(ListBox1.SetFocus, LB_FINDSTRING, -1, _ ByVal CStr(TextBox1.Text)) End Sub
Private Sub UserForm_Initialize() ListBox1.Clear ListBox1.AddItem "Apples" ListBox1.AddItem "Banana" ListBox1.AddItem "Bread" ListBox1.AddItem "Break" ListBox1.AddItem "Baareak" TextBox1.Text = "" End Sub |
|