please help me!

Page 1 of 1

1 Replies - 365 Views - Last Post: 15 January 2013 - 08:15 AM Rate Topic: -----

#1 jayveeeeeee  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 66
  • Joined: 27-September 12

please help me!

Posted 15 January 2013 - 08:08 AM

   Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim d As Integer = d.ToString()
        ListBox1.BeginUpdate()
        For d = 1 To 5
            ListBox1.Items.Add(d)
        Next d
        ListBox1.EndUpdate()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim d As Integer = d.ToString()
        ListBox1.BeginUpdate()
        ListBox2.BeginUpdate()
        While ListBox1.SelectedItems.Count > 0
            d = ListBox1.Items.Add(0)
            ListBox1.Items.Remove(d)
            ListBox2.Items.Add(d * d)
            ListBox1.EndUpdate()
            ListBox2.EndUpdate()
        End While
    End Sub
End Class
[\code]




i want to create a two listbox with a button and i am doing is in the listbox have a value of loop 1 to 5 and then when i press the button ,in the listbox1 will go into listbox2 but it will multiply by itself ... 



my problem when i run my program and i press the button my program stock (form 1).

[code] Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim d As Integer = d.ToString()
ListBox1.BeginUpdate()
For d = 1 To 5
ListBox1.Items.Add(d)
Next d
ListBox1.EndUpdate()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim d As Integer = d.ToString()
ListBox1.BeginUpdate()
ListBox2.BeginUpdate()
While ListBox1.SelectedItems.Count > 0
d = ListBox1.Items.Add(0)
ListBox1.Items.Remove(d)
ListBox2.Items.Add(d * d)
ListBox1.EndUpdate()
ListBox2.EndUpdate()
End While
End Sub
End Class



Is This A Good Question/Topic? 0
  • +

Replies To: please help me!

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9497
  • View blog
  • Posts: 35,844
  • Joined: 12-June 08

Re: please help me!

Posted 15 January 2013 - 08:15 AM

Do not create duplicate topics. Closing.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1