25-12-14, 06:25 PM
مشكورين هذا الكود الي احتاجه
Dim a As Integer = Nothing
a = Int(Rnd() * ListBox1.Items.Count)
On Error Resume Next
TextBox1.Text = ListBox1.Items.Item(a)
If ListBox1.Items.Count = 0 Then
TextBox1.Clear()
End If
ListBox1.Items.Remove(ListBox1.Items.Item(a))
بس فيه مشكلة بالكود انه يختار من الليستبوكس بالترتيب ابغى اخليه عشوائي وشكرا
Dim a As Integer = Nothing
a = Int(Rnd() * ListBox1.Items.Count)
On Error Resume Next
TextBox1.Text = ListBox1.Items.Item(a)
If ListBox1.Items.Count = 0 Then
TextBox1.Clear()
End If
ListBox1.Items.Remove(ListBox1.Items.Item(a))
بس فيه مشكلة بالكود انه يختار من الليستبوكس بالترتيب ابغى اخليه عشوائي وشكرا
