Compartir por


ToolTip.InitialDelay Propiedad

Definición

Obtiene o establece el tiempo que pasa antes de que aparezca la información sobre herramientas.

public:
 property int InitialDelay { int get(); void set(int value); };
public int InitialDelay { get; set; }
member this.InitialDelay : int with get, set
Public Property InitialDelay As Integer

Valor de propiedad

El período de tiempo, en milisegundos, que el puntero debe permanecer estacionario en un control antes de que se muestre la ventana información sobre herramientas.

Ejemplos

En el ejemplo de código siguiente se crea una instancia de la ToolTip clase y se asocia la instancia a la Form que se crea la instancia. A continuación, el código inicializa las propiedades AutoPopDelayde retraso , InitialDelayy ReshowDelay. Además, la instancia de la ToolTip clase establece la ShowAlways propiedad en true para permitir que el texto de información sobre herramientas se muestre independientemente de si el formulario está activo. Por último, en el ejemplo se asocia texto de información sobre herramientas con dos controles de un formulario, un Button y un CheckBox. El ejemplo de código requiere que el método definido en el ejemplo se encuentre dentro de un Form que contiene un Button control denominado button1 y un CheckBox control denominado checkBox1, y que se llama al método desde el constructor de Form.

// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
void Form1_Load( Object^ sender, System::EventArgs^ e )
{
   // Create the ToolTip and associate with the Form container.
   ToolTip^ toolTip1 = gcnew ToolTip;
   
   // Set up the delays for the ToolTip.
   toolTip1->AutoPopDelay = 5000;
   toolTip1->InitialDelay = 1000;
   toolTip1->ReshowDelay = 500;
   // Force the ToolTip text to be displayed whether or not the form is active.
   toolTip1->ShowAlways = true;
   
   // Set up the ToolTip text for the Button and Checkbox.
   toolTip1->SetToolTip( this->button1, "My button1" );
   toolTip1->SetToolTip( this->checkBox1, "My checkBox1" );
}
// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
private void Form1_Load(object sender, System.EventArgs e)
{
   // Create the ToolTip and associate with the Form container.
   ToolTip toolTip1 = new ToolTip();

   // Set up the delays for the ToolTip.
   toolTip1.AutoPopDelay = 5000;
   toolTip1.InitialDelay = 1000;
   toolTip1.ReshowDelay = 500;
   // Force the ToolTip text to be displayed whether or not the form is active.
   toolTip1.ShowAlways = true;
      
   // Set up the ToolTip text for the Button and Checkbox.
   toolTip1.SetToolTip(this.button1, "My button1");
   toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
}
' This example assumes that the Form_Load event handling method
' is connected to the Load event of the form.
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load
   ' Create the ToolTip and associate with the Form container.
   Dim toolTip1 As New ToolTip()
   
   ' Set up the delays for the ToolTip.
   toolTip1.AutoPopDelay = 5000
   toolTip1.InitialDelay = 1000
   toolTip1.ReshowDelay = 500
   ' Force the ToolTip text to be displayed whether or not the form is active.
   toolTip1.ShowAlways = True
   
   ' Set up the ToolTip text for the Button and Checkbox.
   toolTip1.SetToolTip(Me.button1, "My button1")
   toolTip1.SetToolTip(Me.checkBox1, "My checkBox1")
End Sub

Comentarios

Con la InitialDelay propiedad , puede acortar o prolongar el tiempo que ToolTip espera antes de mostrar una ventana de información sobre herramientas. Si el valor de la InitialDelay propiedad se establece en un valor que es demasiado largo, es posible que el usuario de la aplicación no sepa que la aplicación proporciona ayuda sobre información sobre herramientas. Puede usar esta propiedad para asegurarse de que el usuario tiene información sobre herramientas mostrada rápidamente acortando el tiempo especificado.

El valor de esta propiedad no puede superar 32767.

Si desea tener un patrón de retraso coherente para las ventanas de información sobre herramientas, puede establecer la AutomaticDelay propiedad . La AutomaticDelay propiedad establece las AutoPopDelaypropiedades , ReshowDelayy InitialDelay en los valores iniciales en función de un único valor de hora. Cada vez que se establece la AutomaticDelay propiedad, la InitialDelay propiedad se establece en el mismo valor que la AutomaticDelay propiedad . Una vez establecida la AutomaticDelay propiedad, puede establecer la InitialDelay propiedad independientemente, reemplazando el valor predeterminado.

Se aplica a

Consulte también