•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,273 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,379 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 314 | Replies: 4
![]() |
•
•
Join Date: Nov 2007
Posts: 17
Reputation:
Rep Power: 1
Solved Threads: 0
Hi,
I have a simple question about hovering in a checklistbox. How can I get the value(object ) the hovered item..?
I have tried something like this:
Private Sub CheckboxHover(ByVal sender As Object, ByVal e As EventArgs) Handles CheckedListBox1.MouseHover
'MsgBox(sender.GetType.ToString & ", " & e.GetType.ToString)
'Dim mSender As CheckedListBox = sender
ToolTip1.SetToolTip(Me.CheckedListBox1, "s")
End Sub
The eventargs gives no possibilities and I do not know how to get the hovered Item in the sender..?
I have a simple question about hovering in a checklistbox. How can I get the value(object ) the hovered item..?
I have tried something like this:
Private Sub CheckboxHover(ByVal sender As Object, ByVal e As EventArgs) Handles CheckedListBox1.MouseHover
'MsgBox(sender.GetType.ToString & ", " & e.GetType.ToString)
'Dim mSender As CheckedListBox = sender
ToolTip1.SetToolTip(Me.CheckedListBox1, "s")
End Sub
The eventargs gives no possibilities and I do not know how to get the hovered Item in the sender..?
•
•
Join Date: Dec 2002
Location: West Virginia
Posts: 405
Reputation:
Rep Power: 6
Solved Threads: 42
I don't know what you are doing but it is the Enter and Leave properties.
Private Sub CheckBox1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.Enter
End Sub
Private Sub CheckBox1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.Enter
End Sub
Last edited by waynespangler : Jul 8th, 2008 at 9:14 am.
Wayne
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
•
•
Join Date: Feb 2008
Location: Sivakasi, Tamilnadu, India
Posts: 467
Reputation:
Rep Power: 1
Solved Threads: 83
Hi, To get the Hover Item, Use MousePosition property and CheckedListBox.IndexFromPoint Function.
Ex
Ex
VB.NET Syntax (Toggle Plain Text)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For i As Integer = 0 To 10 CheckedListBox1.Items.Add(i) Next End Sub Dim iInd As Integer Private Sub CheckedListBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles CheckedListBox1.MouseMove Dim iMouse As Point Dim iNewInd As Integer iMouse = CheckedListBox1.PointToClient(Control.MousePosition) iNewInd = CheckedListBox1.IndexFromPoint(iMouse) If (iNewInd >= 0 And iNewInd < CheckedListBox1.Items.Count) And iInd <> iNewInd Then CheckedListBox1.SelectedIndex = iNewInd ToolTip1.SetToolTip(CheckedListBox1, CheckedListBox1.Items.Item(iInd)) iInd = iNewInd End If End Sub
Last edited by selvaganapathy : Jul 8th, 2008 at 1:34 pm.
KSG
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- php/mysql dynamic multi-level menu problem (MySQL)
- problem in javascript coding in asp page (ASP)
- problem with All programs menu &right click on start menu (Windows NT / 2000 / XP / 2003)
- CSS seperator problem (HTML and CSS)
- Scrolling tables problem (HTML and CSS)
- Hover Image Position ??? (HTML and CSS)
- Floating Menus: I have a problem, can you help me figure it out? (HTML and CSS)
- Safe Menu's ? (HTML and CSS)
- WordPress Calendar CSS, anchor problem (HTML and CSS)
Other Threads in the VB.NET Forum
- Previous Thread: Windows application is having problems in connecting to our server.
- Next Thread: Read This


Linear Mode