The List Manager Project: Inserting

After creating the menu, we will add the listbox and write the code to insert items in the listbox.


Get Adobe Flash player

Code

Private Sub InsertToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles InsertToolStripMenuItem.Click
   Dim s As String
   s = InputBox("Enter item", "Add Item")
   If s <> "" Then
      ListBox1.Items.Add(s)
   End If
End Sub
See the complete code at this point.
INDEX, Introduction, Build the Menu, Add items to a listbox, Delete items from the listbox, Save: Write the contents of the list box to a file, Open File: Read file and add to list box, Ask the user if he wants to save, When to ask the user if he wants to save, The User closes the program
Next lesson: List Manager application Finishing Touches

Copyright © Zebra0.com
All rights reserved worldwide.

 
 

Add items to a listbox