ToolTip.InitialDelay Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the time that passes before the ToolTip appears.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public int InitialDelay { get; set; }

Property Value

Type: System.Int32

The period of time, in milliseconds, that the pointer must remain stationary on a control before the ToolTip window is displayed.

With the InitialDelay property, you can shorten or lengthen the time that the ToolTip waits before displaying a ToolTip window. If the value of the InitialDelay property is set to a value that is too long in duration, the user of your application might not know that your application provides ToolTip Help. You can use this property to ensure that the user has ToolTips displayed quickly by shortening the time specified.

The value for this property cannot exceed 32767.

If you want to have a consistent delay pattern for your ToolTip windows, you can set the AutomaticDelay property. The AutomaticDelay property sets the AutoPopDelay, ReshowDelay, and InitialDelay properties to initial values based on a single time value. Every time the AutomaticDelay property is set, the InitialDelay property is set to the same value as the AutomaticDelay property. Once the AutomaticDelay property is set, you can independently set the InitialDelay property, overriding the default value.

The following code example creates an instance of the ToolTip class and associates the instance with the Form that the instance is created within. The code then initializes the delay properties AutoPopDelay, InitialDelay, and ReshowDelay. In addition the instance of the ToolTip class sets the ShowAlways property to true to enable ToolTip text to be displayed regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a Button and a CheckBox. The code example requires that the method defined in the example is located within a Form that contains a Button control named button1 and a CheckBox control named checkBox1, and that the method is called from the constructor of the Form.

// 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");

.NET Framework
Available since 1.1
Return to top