i am trying to change the background color of a tooltip
i am using tooltip.backgroundcolor = color.colr

no errors but thecolor doesn't change

any ideas ?

The .backgroundcolour is incorrect. Try the following -

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
        Me.ToolTip1.ShowAlways = True
        Me.ToolTip1.ReshowDelay = 10
        Me.ToolTip1.AutomaticDelay = 100
 
        Me.ToolTip1.Backcolour = Color.LightGreay       
End Sub

that's what i was using
as i said the tooltip show's the color doesn't change

Hi,

You can test this with a new windows form:

Public Class Form1  
 
Dim tb As TextBox  
Dim tt As ToolTip  
 
Private Sub Form1_Load(ByValsenderAsSystem.Object,_  
ByValeAsSystem.EventArgs)_  
Handles MyBase.Load  
 
tb=NewTextBox  
tb.Location=New Point(12,12)  
Me.Controls.Add(tb)  
 
tt=New ToolTip  
tt.AutoPopDelay=5000  
tt.InitialDelay=250  
tt.ReshowDelay=250  
tt.BackColor=Color.Tomato  
tt.SetToolTip(Me.Controls(0),"SomeText")  
End Sub 
End Class

Edited 6 Years Ago by Luc001: n/a

I never use ToolTips that are definder in control properties. I always make a my tooltip, here's the code:

Private toolTipInformation As New ToolTip

Private Sub show()
    toolTipInformation.Show("some text", window)
End Sub

Private Sub hide()
    toolTipInformation.Hide(window)
End Sub

window
Type: System.Windows.Forms.IWin32Window
The Control to display the ToolTip for.

This article has been dead for over six months. Start a new discussion instead.