23-08-21, 01:18 AM
(22-08-21, 11:42 PM)ahmedabdelaliem كتب : السلام عليكمبارك الله فيك أخي الغالي
المكتبه في الاعلى اخي
PHP كود :
Private Const CB_ERR = (-1)
Private Const CB_GETDROPPEDSTATE = &H157
Private Const CB_SHOWDROPDOWN = &H14F
Private Const CB_FINDSTRING = &H14C
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 Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
وهذا الكود يقوم بالاكتمال التلقائي لعمية البحث
ويجب تغيير خاصية الPHP كود :
Private Sub Combo1_KeyPress(KeyAscii As Integer)
Dim CB As Long
Dim FindString As String
If KeyAscii < 32 Then Exit Sub
If SendMessage(Combo1.hWnd, CB_GETDROPPEDSTATE, 0&, 0&) = 0 Then
SendMessage Combo1.hWnd, CB_SHOWDROPDOWN, 1&, 0&
End If
If Combo1.SelLength = 0 Then
FindString = Combo1.Text & Chr$(KeyAscii)
Else
FindString = Left$(Combo1.Text, Combo1.SelStart) & Chr$(KeyAscii)
End If
CB = SendMessage(Combo1.hWnd, CB_FINDSTRING, -1, ByVal FindString)
If CB <> CB_ERR Then
Combo1.ListIndex = CB
Combo1.SelStart = Len(FindString)
Combo1.SelLength = Len(Combo1.Text) - Combo1.SelStart
KeyAscii = 0
End If
End Sub
Style الى Simple Combo
بالتوفيق
الاسم الافتراضي الى الكومبو هو Combo1
بالتوفيق
"" بارك الله لكل من استفاد و أفاد بعلمه ""
hamada salah
