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 ?

Recommended Answers

All 5 Replies

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

Under what sub do you have the tooltip showing up? Is it on button click, form load etc?

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.