|
[ Главная ] [ Статьи ] [ Для новичков ] [ Примеры ] [ Программы ] [ Microsoft Agent 2.0 ] [ Пособие ] [ Уроки ] [ Разное ] |
Быстрый поиск элемента в списке.
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long Private Declare Function RegEnumKey Lib "advapi32.dll" Alias "RegEnumKeyA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, ByVal cbName As Long) As Long Function GetAllExts() As Variant Dim lRegResult As Long Dim lCounter As Long Dim hCurKey As Long Dim strBuffer As String Dim lDataBufferSize As Long Dim intZeroPos As Integer lCounter = 0 lRegResult = RegOpenKey(&H80000000, "", hCurKey) Do lDataBufferSize = 255 strBuffer = String(lDataBufferSize, " ") lRegResult = RegEnumKey(hCurKey, lCounter, strBuffer, lDataBufferSize) If lRegResult = 0& Then intZeroPos = InStr(strBuffer, Chr$(0)) If Left(strBuffer, 1) = "." Then Form1.Combo1.AddItem LCase(Right(strBuffer, Len(strBuffer) - 1)) End If lCounter = lCounter + 1 Else Exit Do End If Loop End Function Private Sub Form_Load() GetAllExts End Sub Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer)
|
|
|
|
>>>Если у вас есть статья которой нет на сайте
пришлите ее мне--------> Послать статью >>>Если вы хотите задать вопрос пишите--------> Мне нужна помощь |
|
|
|