15-04-16, 02:21 AM
15-04-16, 03:43 AM
PHP كود :
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
' do something with x & y
End Sub
15-04-16, 03:49 AM
(15-04-16, 03:43 AM)silverlight كتب : [ -> ]شكرآ اخىPHP كود :
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
' do something with x & y
End Sub