Private x As Integer = 0 Private y As Integer = 0 Private Sub ListBox1_MouseDown(sender As Object, e As MouseEventArgs) Handles ListBox1.MouseDown Dim currentItem = ListBox1.IndexFromPoint(New Point(e.X, e.Y)) If currentItem >= 0 Then x = e.Location.X y = e.Location.Y ' الرسالة التي تظهر الهدف منها التوضيح فقط لا غير MessageBox.Show("index " & currentItem & " is clicked and the current item is " & ListBox1.Items(currentItem.ToString) & "Location is " & "(" & x & "," & y & ")") End If
Private x As Integer = 0 Private y As Integer = 0 Private Sub ListBox1_MouseDown(sender As Object, e As MouseEventArgs) Handles ListBox1.MouseDown Dim currentItem = ListBox1.IndexFromPoint(New Point(e.X, e.Y)) If currentItem >= 0 Then x = e.Location.X y = e.Location.Y ' الرسالة التي تظهر الهدف منها التوضيح فقط لا غير MessageBox.Show("index " & currentItem & " is clicked and the current item is " & ListBox1.Items(currentItem.ToString) & "Location is " & "(" & x & "," & y & ")") End If