منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
هل يمكن الحصول على x y لى listbox selecteditem - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : هل يمكن الحصول على x y لى listbox selecteditem (/showthread.php?tid=15491)



هل يمكن الحصول على x y لى listbox selecteditem - أسامة - 15-04-16

هل يمكن الحصول على x y لى listbox selecteditem ؟ مثلآ x y بتاعت item الاولى 3,2


RE: هل يمكن الحصول على x y لى listbox selecteditem - silverlight - 15-04-16

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 



RE: هل يمكن الحصول على x y لى listbox selecteditem - أسامة - 15-04-16

(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 
شكرآ اخى