Member Avatar

Hi, I read many articles about this, but I still couldn't manage to solve it. I want to select the item of a listbox with MouseEnter event. It should be something similar like this Private Sub LBox_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles LBox.MouseDown If e.Button = MouseButtons.Right Then Dim index As Integer = LBox.IndexFromPoint(New Point(e.X, e.Y)) If index >= 0 Then LBox.SelectedItem = LBox.Items(index) Debug.Print(LBox.SelectedItem) End If End If End Sub Would appreciate your help. Thank you.

Member Avatar
0
47
Member Avatar

Hi Everyone! :) Hope someone can help me in this problem. :?: [B]Things I have:[/B] Button1 Picturebox1 (Name: Block) Timer1 (Interval: 100) Label1, which has the MouseEnter event. The MouseEnter event is MoveToStart(). Panel1, which includes Picturebox1, Label1. [I](The codes are at the bottom)[/I] [B]My Problem:[/B] When Form1 debugs (runs), I click on Button1, which enables and starts Timer1. Picturebox1 (Block) starts moving right and then left and then right and then goes on. I have put a MouseEnter event on the Picturebox so when Picturebox1 is moving, and the mouse enters Picturebox1, a message box should appear. BUT, when …

0
1

The End.