Please refer to the following code to enable tooltip for the disabled button:
bool IsShown = false;
private void Form1_Load(object sender, System.EventArgs e)
{
toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 500;
toolTip1.ShowAlways = true;
toolTip1.SetToolTip(this.button1, "test button");
}
void Form1_MouseMove(object sender, MouseEventArgs e)
{
Control ctrl = this.GetChildAtPoint(e.Location);
if (ctrl != null)
{
if (ctrl == this.button1 && !IsShown)
{
string tipstring = this.toolTip1.GetToolTip(this.button1);
this.toolTip1.Show(tipstring, this.button1, this.button1.Width / 2, this.button1.Height / 2);
IsShown = true;
}
}
else
{
this.toolTip1.Hide(this.button1);
IsShown = false;
}
}
private void button1_Click(object sender, EventArgs e)
{
button1.Enabled = false;
}
I haven't found a way to do it without any Mouse events. It seems that Mouse_Move is necessary.
If it were in WPF, it would be simpler.
<Button x:Name="button" ToolTipService.ShowOnDisabled="True" Content="Button"/>
Problem displaying tooltip over a disabled control
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.