NetworkState.MachineOnlineState, propriété
Obtient l'état de connexion actuel de l'ordinateur client.
Espace de noms : Microsoft.Office.InfoPath
Assembly : Microsoft.Office.InfoPath (dans Microsoft.Office.InfoPath.dll)
Syntaxe
'Déclaration
Public MustOverride ReadOnly Property MachineOnlineState As MachineState
Get
'Utilisation
Dim instance As NetworkState
Dim value As MachineState
value = instance.MachineOnlineState
public abstract MachineState MachineOnlineState { get; }
Valeur de la propriété
Type : Microsoft.Office.InfoPath.MachineState
L'une des valeurs d'énumération.
Remarques
Ce membre est accessible sans restrictions.
Ce type ou ce membre est accessible uniquement à partir du code exécuté dans les formulaires ouverts dans Microsoft InfoPath Filler.
Exemples
Dans l'exemple de code ci-dessous, la propriété MachineOnlineState est utilisée pour afficher l'état de connexion actuel de l'ordinateur client.
using Microsoft.Office.InfoPath;
string networkState =
formControl1.XmlForm.NetworkState.MachineOnlineState.ToString();
// Display result in a message box.
MessageBox.Show("The connection state is " + networkState);
Imports Microsoft.Office.InfoPath
Dim networkState As String = _
formControl1.XmlForm.NetworkState.MachineOnlineState.ToString()
' Display result in a message box.
MessageBox.Show("The connection state is " & networkState)