منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : هل يمكن الحصول على x y لى listbox selecteditem
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
هل يمكن الحصول على x y لى listbox selecteditem ؟ مثلآ x y بتاعت item الاولى 3,2
PHP كود :
   Private x As Integer 0
    Private y 
As Integer 0
    Private Sub ListBox1_MouseDown
(sender As ObjectAs MouseEventArgsHandles ListBox1.MouseDown
        Dim currentItem 
ListBox1.IndexFromPoint(New Point(e.Xe.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

        ' 
do something with x y
    End Sub 
(15-04-16, 03:43 AM)silverlight كتب : [ -> ]
PHP كود :
   Private x As Integer 0
    Private y 
As Integer 0
    Private Sub ListBox1_MouseDown
(sender As ObjectAs MouseEventArgsHandles ListBox1.MouseDown
        Dim currentItem 
ListBox1.IndexFromPoint(New Point(e.Xe.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

        ' 
do something with x y
    End Sub 
شكرآ اخى