IsDirty



Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long
Private Sub Command12_Click()
Const EM_GETMODIFY = &HB8
Dim hWndEdit As Long
Dim dirty As Long
'get the handle to the edit portion

'of the combo control. FindWindowEx finds the

'child hwnds associated with the hwnd passed.

'With a combo, the first returned is the edit.

hWndEdit = FindWindowEx(Combo1.hwnd, 0&, 0&, 0&)
'see if the text has changed

dirty = SendMessageLong(hWndEdit, EM_GETMODIFY, 0&, 0&)
'the result

MsgBox IIf(dirty, "Text has changed", "No change")
End Sub


(isdirty.html)- by Paolo Puglisi - Modifica del 25/3/2019