25-11-19, 06:03 PM
(25-11-19, 05:52 PM)3booody كتب : [ -> ]بنفس حدث الليبل
كود :
DataGridView1.Rows.Add(ListBox1.SelectedItem.ToString)
الله ينوراخي لكن معلش الداتا جريد فيو فيها عامودين انا اريد البيانات تروح الي العمود الاول
(25-11-19, 05:52 PM)3booody كتب : [ -> ]بنفس حدث الليبل
كود :
DataGridView1.Rows.Add(ListBox1.SelectedItem.ToString)
DataGridView1.Rows.Add("", ListBox1.SelectedItem.ToString)DataGridView1.Rows.Add(ListBox1.SelectedItem.ToString, "")(25-11-19, 06:48 PM)3booody كتب : [ -> ]لم افهم اخي لان كودي تروح للعمود الاولالله ينور والله الموضوع ده فيه حاجات كتير جدا تخص الليست بوكس علشان لو الاخوه الاعضاء حد سأل هيجدها في هذا الموضوع
تريد هذا؟
كود :
DataGridView1.Rows.Add("", ListBox1.SelectedItem.ToString)
او
كود :
DataGridView1.Rows.Add(ListBox1.SelectedItem.ToString, "")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Dim i As Integer = 0
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If ListBox1.Items.Count > 1 Then
If i > ListBox1.Items.Count - 1 Then
i = 0
End If
ListBox1.SelectedIndex = i
i += 1
End If
End Sub(26-11-19, 08:14 AM)3booody كتب : [ -> ]كود :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Dim i As Integer = 0
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If ListBox1.Items.Count > 1 Then
If i > ListBox1.Items.Count - 1 Then
i = 0
End If
ListBox1.SelectedIndex = i
i += 1
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.SelectedIndex = 0
End Sub(26-11-19, 04:05 PM)3booody كتب : [ -> ]كود :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.SelectedIndex = 0
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
If ListBox1.SelectedIndex = ListBox1.Items.Count - 1 Then
MsgBox("تم الانتهاء")
End If
End Sub(07-12-19, 05:20 PM)3booody كتب : [ -> ]كود :
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
If ListBox1.SelectedIndex = ListBox1.Items.Count - 1 Then
MsgBox("تم الانتهاء")
End If
End Sub
اعتذر الان رأيت المشاركة