Balloon Tooltip for VB.Net
-
I was told that VB.Net has the capability of displaying a Balloon Tooltip but no one seemed to know how to do it. There are lots of projects on The Code Projects that use C# to create balloon tooltips but nothing in VB.Net Does anyone know how to implement Balloon Tooltips in VB.Net or have a project that shows how to create that type of tooltip. Thanks
-
I was told that VB.Net has the capability of displaying a Balloon Tooltip but no one seemed to know how to do it. There are lots of projects on The Code Projects that use C# to create balloon tooltips but nothing in VB.Net Does anyone know how to implement Balloon Tooltips in VB.Net or have a project that shows how to create that type of tooltip. Thanks
No I dont have any examples. But why dont you just use an assembly generated with C# in your VB.Net app?
-
No I dont have any examples. But why dont you just use an assembly generated with C# in your VB.Net app?
-
I was told that VB.Net has the capability of displaying a Balloon Tooltip but no one seemed to know how to do it. There are lots of projects on The Code Projects that use C# to create balloon tooltips but nothing in VB.Net Does anyone know how to implement Balloon Tooltips in VB.Net or have a project that shows how to create that type of tooltip. Thanks
There is an article on this board that has VB code. I got it to work OK. It has a few problems, but should give you a starting point at least. Has anyone tried it? http://www.codeproject.com/csharp/BalloonTipsArticle.asp#xx620141xx[^]
-
There is an article on this board that has VB code. I got it to work OK. It has a few problems, but should give you a starting point at least. Has anyone tried it? http://www.codeproject.com/csharp/BalloonTipsArticle.asp#xx620141xx[^]
I downloaded that before going to this message board and I couldn't get it to work. However, that has been about a week ago and I've forgotten what problem I ran into. I'll look into it again. But if you had to do something to make it work I would appreciate finding out what you did.
-
I downloaded that before going to this message board and I couldn't get it to work. However, that has been about a week ago and I've forgotten what problem I ran into. I'll look into it again. But if you had to do something to make it work I would appreciate finding out what you did.
I looked at the code again and I remembered that I could not figure out what code I needed to use to make it work. I added a textbox to the Form1 and then tried to use the mouse hover event. The only success I had was the Dim tp As New BalloonTool. Then I could get any thing going from there. This is the code I am currently using and I am just displaying a normal tooltip. But I would like to display a balloon tooltip. Private Sub DataGrid1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseMove Dim GrdX As Int32 Dim GrdY As Int32 Dim htInfo As DataGrid.HitTestInfo Try htInfo = Me.DataGrid1.HitTest(e.X, e.Y) If htInfo.Column = 1 Then Dim colCount As Int32 colCount = ds.Tables(0).Columns.Count() Dim tipText As String = Me.DataGrid1.Item(htInfo.Row, colCount - 2).ToString() & " " & Me.DataGrid1.Item(htInfo.Row, colCount - 1).ToString() If tipText.Length > 0 AndAlso tipText.Trim() <> "0" Then Me.ToolTip1.SetToolTip(Me.DataGrid1, tipText) Else Me.ToolTip1.SetToolTip(Me.DataGrid1, "") End If Else Me.ToolTip1.SetToolTip(Me.DataGrid1, "") End If Catch exc As Exception End Try End Sub If you could help me with this, using the classes you refereneced I would really appreciate it.
-
I looked at the code again and I remembered that I could not figure out what code I needed to use to make it work. I added a textbox to the Form1 and then tried to use the mouse hover event. The only success I had was the Dim tp As New BalloonTool. Then I could get any thing going from there. This is the code I am currently using and I am just displaying a normal tooltip. But I would like to display a balloon tooltip. Private Sub DataGrid1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseMove Dim GrdX As Int32 Dim GrdY As Int32 Dim htInfo As DataGrid.HitTestInfo Try htInfo = Me.DataGrid1.HitTest(e.X, e.Y) If htInfo.Column = 1 Then Dim colCount As Int32 colCount = ds.Tables(0).Columns.Count() Dim tipText As String = Me.DataGrid1.Item(htInfo.Row, colCount - 2).ToString() & " " & Me.DataGrid1.Item(htInfo.Row, colCount - 1).ToString() If tipText.Length > 0 AndAlso tipText.Trim() <> "0" Then Me.ToolTip1.SetToolTip(Me.DataGrid1, tipText) Else Me.ToolTip1.SetToolTip(Me.DataGrid1, "") End If Else Me.ToolTip1.SetToolTip(Me.DataGrid1, "") End If Catch exc As Exception End Try End Sub If you could help me with this, using the classes you refereneced I would really appreciate it.
I just used the example forms included in the source project, and it worked OK. I did not study the code, sorry.
-
I looked at the code again and I remembered that I could not figure out what code I needed to use to make it work. I added a textbox to the Form1 and then tried to use the mouse hover event. The only success I had was the Dim tp As New BalloonTool. Then I could get any thing going from there. This is the code I am currently using and I am just displaying a normal tooltip. But I would like to display a balloon tooltip. Private Sub DataGrid1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseMove Dim GrdX As Int32 Dim GrdY As Int32 Dim htInfo As DataGrid.HitTestInfo Try htInfo = Me.DataGrid1.HitTest(e.X, e.Y) If htInfo.Column = 1 Then Dim colCount As Int32 colCount = ds.Tables(0).Columns.Count() Dim tipText As String = Me.DataGrid1.Item(htInfo.Row, colCount - 2).ToString() & " " & Me.DataGrid1.Item(htInfo.Row, colCount - 1).ToString() If tipText.Length > 0 AndAlso tipText.Trim() <> "0" Then Me.ToolTip1.SetToolTip(Me.DataGrid1, tipText) Else Me.ToolTip1.SetToolTip(Me.DataGrid1, "") End If Else Me.ToolTip1.SetToolTip(Me.DataGrid1, "") End If Catch exc As Exception End Try End Sub If you could help me with this, using the classes you refereneced I would really appreciate it.
To make it work you need thes lines of code (as found in the examples):
'Declarations Private m_hb As HoverBalloon = New HoverBalloon 'in the Constructor m_hb.Title = "Traders corp. Inc" m_hb.TitleIcon = TooltipIcon.Info m_hb.SetToolTip(Button1, "To expediate your process please click here")
After a quick check I noticed that this component wont fit your needs, because it currently doesnt allow to change the tooltip (well it allows it but gives an exception :-)). You will have to extend/correct this component or search for alternatives :((. Or you could just make it yourself and write an article :-D -
To make it work you need thes lines of code (as found in the examples):
'Declarations Private m_hb As HoverBalloon = New HoverBalloon 'in the Constructor m_hb.Title = "Traders corp. Inc" m_hb.TitleIcon = TooltipIcon.Info m_hb.SetToolTip(Button1, "To expediate your process please click here")
After a quick check I noticed that this component wont fit your needs, because it currently doesnt allow to change the tooltip (well it allows it but gives an exception :-)). You will have to extend/correct this component or search for alternatives :((. Or you could just make it yourself and write an article :-D -
Believe me, if I figure this out there will be an article. It just doesn't seem like it should be this difficult.