Control.CheckForIllegalCrossThreadCalls Propriété

Définition

Obtient ou définit une valeur indiquant s'il faut intercepter des appels sur le thread incorrect qui accède à la propriété Handle d'un contrôle lorsqu'une application est en cours de débogage.

public:
 static property bool CheckForIllegalCrossThreadCalls { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(false)]
public static bool CheckForIllegalCrossThreadCalls { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.CheckForIllegalCrossThreadCalls : bool with get, set
Public Shared Property CheckForIllegalCrossThreadCalls As Boolean

Valeur de propriété

Boolean

true si des appels sur le thread incorrect sont interceptés ; sinon, false.

Attributs

Remarques

Lorsqu’un thread autre que le thread de création d’un contrôle tente d’accéder à l’une des méthodes ou propriétés de ce contrôle, il entraîne souvent des résultats imprévisibles. Une activité de thread non valide courante est un appel sur le thread incorrect qui accède à la propriété du Handle contrôle. Définissez-le CheckForIllegalCrossThreadCalls pour true rechercher et diagnostiquer plus facilement cette activité de thread lors du débogage.

S’applique à