作者:VB.NET开发
项目:System.Windows.Automation.Provide
Sub AdviseEventAdded(ByVal eventId As Integer, ByVal properties() As Integer) _
Implements IRawElementProviderAdviseEvents.AdviseEventAdded
If eventId = AutomationElement.AutomationPropertyChangedEvent.Id Then
For Each i As Integer In properties
Dim autoProperty As AutomationProperty = AutomationProperty.LookupById(i)
' Add to an ArrayList.
subscribedProperties.Add(autoProperty)
Next
End If
End Sub