Изменилось ли содержимое ComboBox.
Добавьте элементы ComboBox и CommandButton
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWndParent As Long, ByVal hWndChild As Long, ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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
Const EM_SETMODIFY = &HB9
Const EM_GETMODIFY = &HB8
Private Sub Command1_Click()
Dim CombohWnd As Long
Dim DirtyFlag As Long
CombohWnd = FindWindowEx(Combo1.hWnd, 0&, vbNullString, vbNullString)
DirtyFlag = SendMessage(CombohWnd, EM_GETMODIFY, ByVal 0&, ByVal 0&)
If DirtyFlag = 1 Then
MsgBox "Содержимое Combo Box изменилось"
Else
MsgBox "Содержимое Combo Box не изменилось"
End If
End Sub
|