Occurs when the value of the
UserMode property changes.
Syntax
Visual Basic (Declaration) | |
---|
Public Event UserModeChanged() As EventHandler |
Example
This example subscribes to the UserModeChanged event in order to update a UI element.
Visual Basic | Copy Code |
---|
Public Sub AnnAutomationManager_UserModeChanged(ByVal manager As AnnAutomationManager)
AddHandler manager.UserModeChanged, AddressOf OnUserModeChanged
End Sub
Private Sub OnUserModeChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim manager As AnnAutomationManager = CType(IIf(TypeOf sender Is AnnAutomationManager, sender, Nothing), AnnAutomationManager)
MessageBox.Show(String.Format("User mode has changed, new mode is {0}", manager.UserMode))
End Sub |
C# | Copy Code |
---|
public void AnnAutomationManager_UserModeChanged(AnnAutomationManager manager) { manager.UserModeChanged += new EventHandler(OnUserModeChanged); } private void OnUserModeChanged(object sender, EventArgs e) { AnnAutomationManager manager = sender as AnnAutomationManager; MessageBox.Show(String.Format("User mode has changed, new mode is {0}", manager.UserMode)); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also