Visual Basic.NET Programming. Beginner Lesson 5. Input with Windows Forms

Share

Summary

This video tutorial covers how to capture user input in Visual Basic.NET applications using Windows Forms. It demonstrates the use of the `InputBox` function, text boxes, and list boxes, explaining how to name controls, set properties, and manage data flow.

Highlights

Capturing Input with InputBox Function
00:00:06

The video begins by demonstrating a quick way to capture user input using the `InputBox` function. It shows how to add a button to a form, declare a string variable, and use `InputBox` to prompt the user for input, which is then displayed in a message box.

Using Text Boxes for Input
00:01:36

The tutorial then shifts to using controls on a form to capture input. It details how to place text boxes and labels on a form, giving them meaningful names (e.g., `txtFirstName`, `lblFirstName`) and setting their text properties. It emphasizes the importance of unique control names and naming conventions.

Control Naming and Layout Best Practices
00:03:56

This section highlights rules for naming controls, such as ensuring unique names and avoiding spaces or special characters. It also provides tips for organizing form layout using guidelines and the format menu to align and size controls consistently.

Retrieving Data from Text Boxes
00:06:06

The video explains how to write code to retrieve data entered into text boxes. It involves declaring string variables to store the input and assigning the `Text` property of each text box to its corresponding variable. The captured data is then displayed in a message box.

Using List Boxes for Input
00:09:09

The tutorial introduces list boxes as another way to capture user input. It shows how to add a list box and a label, name them, and populate the list box with predefined items using the `Items` property. It then demonstrates how to capture the user's selection from the list box.

Programmatically Adding List Box Items
00:10:52

Finally, the video illustrates how to add items to a list box programmatically. This is done by writing code in the `Form1_Load` procedure, which executes before the form appears, to dynamically add items to the list box's `Items` collection.

Recently Summarized Articles

Loading...