How to Make a To Do List Program in Visual Basic
Make sure you have a version of Visual Basic installed., Create a new Windows Forms application., Add the following: 1 TextBox 3 buttons 1 ListBox , Put the ListBox on the left side of your form, the TextBox on the right side, Button1 next to your...
Step-by-Step Guide
-
Step 1: Make sure you have a version of Visual Basic installed.
If you do, then you're ready to go! If not, it can easily be downloaded from the Microsoft website.
If you want a free version, get the Express Edition. -
Step 2: Create a new Windows Forms application.
To do this, go to File > New Project and select Windows Forms Application. ,, Feel free to resize these elements! , After that, double click it and add the following code:
ListBox1.Items.Add(TextBox1.Text.ToString) TextBox1.Text = " "
,,, After that, add this code:
If e.KeyCode = Keys.Enter Then Button1.PerformClick() End If , -
Step 3: Add the following: 1 TextBox 3 buttons 1 ListBox
-
Step 4: Put the ListBox on the left side of your form
-
Step 5: the TextBox on the right side
-
Step 6: Button1 next to your TextBox
-
Step 7: and the other two buttons below your first button.
-
Step 8: Change the text of the button under your TextBox to "Add".
-
Step 9: Change the text of your other two buttons to "Remove"
-
Step 10: and "Clear".
-
Step 11: Double-click the Remove button and add this code: ListBox1.Items.Remove(ListBox1.SelectedItem).
-
Step 12: Double click the Clear button and add this code: ListBox1.Items.Clear().
-
Step 13: As a bonus
-
Step 14: double-click your TextBox
-
Step 15: and in the upper-righthand corner
-
Step 16: change "TextChanged" to "KeyDown".
-
Step 17: Tweak your application to your liking!
Detailed Guide
If you do, then you're ready to go! If not, it can easily be downloaded from the Microsoft website.
If you want a free version, get the Express Edition.
To do this, go to File > New Project and select Windows Forms Application. ,, Feel free to resize these elements! , After that, double click it and add the following code:
ListBox1.Items.Add(TextBox1.Text.ToString) TextBox1.Text = " "
,,, After that, add this code:
If e.KeyCode = Keys.Enter Then Button1.PerformClick() End If ,
About the Author
Alexander Palmer
A passionate writer with expertise in organization topics. Loves sharing practical knowledge.
Rate This Guide
How helpful was this guide? Click to rate: