Visual Basic programming is all about turning problems into step-by-step... Show more
Learn Problem Solving with Computers: Chapters 1-4 Overview











Introduction to Computing and Problem Solving
Every computer program follows the same basic pattern: Input → Process → Output. Programs take data from sources like keyboards or files, manipulate it according to instructions, and produce results on screens or in files.
Visual Basic uses zero-based numbering, meaning counting starts at 0 instead of 1—an important concept to remember when programming. When developing a program (also called an application, project, or solution), you'll follow the Program Development Cycle.
💡 Remember that computers only do exactly what they're told! If your program doesn't work correctly, it's because the instructions need refinement, not because the computer misunderstood.
The key to successful programming is breaking down complex problems into smaller, manageable tasks that can be expressed in programming language. Your job as a programmer is to create these clear instructions.

Program Development Cycle
Creating a successful program means following a structured approach. The Program Development Cycle has six essential steps:
- Analyze: Define the problem clearly, identifying what you need to accomplish
- Design: Plan your solution by determining output, identifying required input, and mapping the process
- Choose the Interface: Select appropriate objects like text boxes and buttons
- Code: Translate your algorithm into programming language
- Test and debug: Find and fix errors in your program
- Document: Organize all materials that describe the program
Good programmers don't jump straight to coding. Instead, they use planning tools like flowcharts, pseudocode, and hierarchy charts to visualize solutions before writing any code.
When planning your algorithm, always work backward: first determine the desired output, then identify what input you need, and finally figure out the steps to transform that input into output.

Programming Tools
Flowcharts use standardized symbols to visually map program logic. Each symbol has a specific meaning:
- Flowlines (arrows) connect symbols and show logic flow
- Terminals (rounded rectangles) mark start/end points
- Input/Output symbols (trapezoids) represent data being read or displayed
- Processing symbols (rectangles) show calculations or data manipulation
- Decision symbols (diamonds) represent yes/no choices with two exit paths
- Connectors (circles) join flowlines
Hierarchy charts show how different parts of a program relate to each other, creating a visual roadmap of program organization.
🔑 The beauty of planning tools like flowcharts and pseudocode is that they're language-independent—you can use them to plan your solution regardless of what programming language you'll ultimately use.
These visual tools help you think through your solution before writing a single line of code, making the actual coding process much smoother.

Using Planning Tools
When working with a flowchart, you trace it by starting at the beginning symbol and following the flow lines to the end, just as a computer would execute your program.
Let's look at a sample flowchart for a postage-stamp program:
- Start by obtaining the number of sheets
- Calculate stamps needed by dividing sheets by 5
- Round up to the nearest whole number if necessary
- Display the number of stamps needed
Flowcharts, pseudocode, and hierarchy charts are language-independent tools—they help you plan your logic regardless of what programming language you'll use to implement the solution.
These planning tools might seem like extra work at first, but they save tremendous time later by helping you catch logical errors before you start coding. The clearer your plan, the smoother your coding process will be.

Introduction to Visual Basic
Visual Basic is a powerful language for creating Windows applications with a Graphical User Interface (GUI). What makes Visual Basic special is that it's event-driven—the program responds to user actions like clicking buttons or typing text.
Developing a Visual Basic program follows three main steps:
- Design the user interface with controls
- Determine which events the controls should recognize
- Write event procedures to handle those events
Visual Basic offers several important controls for building interfaces:
- Text box controls for input and output
- Button controls that users click to trigger actions
- Label controls to identify other interface elements
- List box controls to display multiple items
💡 Think of your program interface as a conversation with the user. Each control is a way for users to communicate with your program or for your program to communicate back.
The interface design is crucial—a well-designed interface makes your program intuitive and easy to use, regardless of how complex the underlying code might be.

Visual Basic Screen and Controls
The Visual Basic development environment contains several key parts:
- Form Designer where you visually create your interface
- Toolbox containing controls you can add to your form
- Properties window for customizing controls
- Solution Explorer to manage project files
You can place controls on your form in four different ways:
- Double-clicking the control in the toolbox
- Dragging and dropping from the toolbox
- Clicking the control and then clicking on the form
- Clicking the control and then dragging on the form
Text Box controls are versatile elements used for both input and output. When using text boxes for output only, set the ReadOnly property to True to prevent users from changing the displayed information.
Controls can be adjusted using the sizing handles that appear when you select them. These small squares let you resize controls precisely to fit your interface design needs.

Working with Control Properties
Every control in Visual Basic has properties that determine its appearance and behavior. The Properties window displays all available properties for the currently selected control.
For text boxes, important properties include:
- ReadOnly: Determines if users can modify the content
- ScrollBars: Adds scrolling capability for large text
- TabIndex: Sets the order controls are selected when pressing Tab
- Text: The content displayed in the text box
- TextAlign: Controls how text is aligned (left, center, right)
The Properties window is divided into two columns—the left shows property names, and the right displays their current values. The description pane at the bottom provides helpful information about the selected property.
When a control is selected, sizing handles appear around it, allowing you to resize it by dragging. The Tasks button provides quick access to common operations for the selected control.

Setting Control Properties
Every control has properties that determine how it looks and behaves. Some of the most commonly adjusted properties include:
- Text: The text displayed on or in the control
- AutoSize: Whether the control automatically resizes to fit its content
- Font.Name and Font.Size: The typeface and size of text
- ForeColor: The color of text
- BackColor: The background color of the control
- ReadOnly: For text boxes, prevents user editing
To change a property:
- Select the control
- Find the property in the Properties window
- Enter a new value or select from available options
🔧 Mastering the Properties window is crucial for efficient development. Learning keyboard shortcuts for common property adjustments can significantly speed up your workflow.
The Font property requires special handling—click on the ellipsis (...) button to open the Font dialog where you can select the font family, style, and size all at once.

More Essential Controls
Button controls are the workhorses of Visual Basic applications. The button's Text property sets its caption, which should clearly indicate what happens when clicked. For example, a button that calculates totals might be labeled "Calculate" or "Compute Total."
Label controls help users understand your interface by identifying what other controls are for. Some important label properties:
- The Text property sets what the label displays
- By default, the AutoSize property is True, making labels resize automatically
- Setting AutoSize to False lets you manually resize labels for multi-line text
The Font dialog gives you complete control over text appearance:
- Select font families from the left list
- Choose styles (Regular, Bold, Italic) from the middle list
- Set the size from the right list
- Preview your selections in the sample box
After making your font selections, click OK to apply them to your control. A well-chosen font enhances both readability and the professional appearance of your application.

Advanced Controls and Naming Conventions
List Box controls display multiple items, making them perfect for showing several results at once. Users can select items from the list, making it interactive.
The Name property is crucial for programming—it's how you'll refer to controls in your code:
- Always use the three-character prefix convention (btn, lbl, txt, lst)
- Follow the prefix with a descriptive name (btnCompute, txtAddress)
- Good naming makes your code more readable and maintainable
When designing your interface, consider font choices carefully:
- Proportional fonts like Microsoft Sans Serif use different widths for different characters
- Fixed-width fonts like Courier New use the same width for every character
- Use fixed-width fonts when creating tables or when alignment matters
💡 The Auto Hide feature helps manage screen space by automatically collapsing windows like the Toolbox when not in use. Look for the push pin icon—horizontal means Auto Hide is enabled, vertical means it's disabled.
Remember that a well-designed interface with consistent naming conventions makes your program easier to use and your code easier to maintain.
We thought you’d never ask...
What is the Knowunity AI companion?
Our AI companion is specifically built for the needs of students. Based on the millions of content pieces we have on the platform we can provide truly meaningful and relevant answers to students. But its not only about answers, the companion is even more about guiding students through their daily learning challenges, with personalised study plans, quizzes or content pieces in the chat and 100% personalisation based on the students skills and developments.
Where can I download the Knowunity app?
You can download the app in the Google Play Store and in the Apple App Store.
Is Knowunity really free of charge?
That's right! Enjoy free access to study content, connect with fellow students, and get instant help – all at your fingertips.
Most popular content in Computer Science / Programming
3AP Computer Science Principles Full Review
a full review to prepare for the AP CSP exam
HTML tags, codes, definition
HTML tags, codes, and definition with examples
Intro to Python Pt 1
This is a summary of the basics of python such as variables, print, and if statements.
Most popular content
9Origins and Dynamics of the Columbian Exchange
Analyze the ecological and economic motivations behind the initial transfer of goods, people, and diseases between the Old and New Worlds.
Introduction to Early Cultural Interactions
Analyze the initial social and religious encounters between Europeans, Africans, and Indigenous peoples in the colonial Americas.
Origins of Ancient River Civilizations
Analyze the environmental factors and technological innovations that led to the rise of early states in Mesopotamia, Egypt, and the Indus Valley.
Motivations for European Exploration
Analyze the economic, religious, and political factors that drove European powers to the Americas during the 15th and 16th centuries.
Foundations of Ethical Guidelines in Research
Practice the core principles of the APA ethical code including informed consent, debriefing, and the role of Institutional Review Boards.
Introduction to Native American Societies
Examine the diverse social, political, and economic structures of North American indigenous groups prior to European contact.
Introduction to Biological Elements of Life
Practice identifying the essential elements including carbon, nitrogen, phosphorus, and sulfur that compose biological macromolecules.
Introduction to the Spanish Encomienda System
Explore the fundamental economic and social structures of the Spanish colonial system, focusing on the encomienda and the casta social hierarchy.
Origins and Continuity of the Byzantine Empire
Analyze the political and cultural transitions from the Roman Empire to the Byzantine Empire, focusing on the reign of Justinian I and his code.
Can't find what you're looking for? Explore other subjects.
Students love us — and so will you.
The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.
This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.
Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.
Learn Problem Solving with Computers: Chapters 1-4 Overview
Visual Basic programming is all about turning problems into step-by-step solutions a computer can understand. This guide explores how to develop programs through planning tools like flowcharts, the basics of Visual Basic's interface, and how to use controls to create... Show more

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
Introduction to Computing and Problem Solving
Every computer program follows the same basic pattern: Input → Process → Output. Programs take data from sources like keyboards or files, manipulate it according to instructions, and produce results on screens or in files.
Visual Basic uses zero-based numbering, meaning counting starts at 0 instead of 1—an important concept to remember when programming. When developing a program (also called an application, project, or solution), you'll follow the Program Development Cycle.
💡 Remember that computers only do exactly what they're told! If your program doesn't work correctly, it's because the instructions need refinement, not because the computer misunderstood.
The key to successful programming is breaking down complex problems into smaller, manageable tasks that can be expressed in programming language. Your job as a programmer is to create these clear instructions.

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
Program Development Cycle
Creating a successful program means following a structured approach. The Program Development Cycle has six essential steps:
- Analyze: Define the problem clearly, identifying what you need to accomplish
- Design: Plan your solution by determining output, identifying required input, and mapping the process
- Choose the Interface: Select appropriate objects like text boxes and buttons
- Code: Translate your algorithm into programming language
- Test and debug: Find and fix errors in your program
- Document: Organize all materials that describe the program
Good programmers don't jump straight to coding. Instead, they use planning tools like flowcharts, pseudocode, and hierarchy charts to visualize solutions before writing any code.
When planning your algorithm, always work backward: first determine the desired output, then identify what input you need, and finally figure out the steps to transform that input into output.

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
Programming Tools
Flowcharts use standardized symbols to visually map program logic. Each symbol has a specific meaning:
- Flowlines (arrows) connect symbols and show logic flow
- Terminals (rounded rectangles) mark start/end points
- Input/Output symbols (trapezoids) represent data being read or displayed
- Processing symbols (rectangles) show calculations or data manipulation
- Decision symbols (diamonds) represent yes/no choices with two exit paths
- Connectors (circles) join flowlines
Hierarchy charts show how different parts of a program relate to each other, creating a visual roadmap of program organization.
🔑 The beauty of planning tools like flowcharts and pseudocode is that they're language-independent—you can use them to plan your solution regardless of what programming language you'll ultimately use.
These visual tools help you think through your solution before writing a single line of code, making the actual coding process much smoother.

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
Using Planning Tools
When working with a flowchart, you trace it by starting at the beginning symbol and following the flow lines to the end, just as a computer would execute your program.
Let's look at a sample flowchart for a postage-stamp program:
- Start by obtaining the number of sheets
- Calculate stamps needed by dividing sheets by 5
- Round up to the nearest whole number if necessary
- Display the number of stamps needed
Flowcharts, pseudocode, and hierarchy charts are language-independent tools—they help you plan your logic regardless of what programming language you'll use to implement the solution.
These planning tools might seem like extra work at first, but they save tremendous time later by helping you catch logical errors before you start coding. The clearer your plan, the smoother your coding process will be.

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
Introduction to Visual Basic
Visual Basic is a powerful language for creating Windows applications with a Graphical User Interface (GUI). What makes Visual Basic special is that it's event-driven—the program responds to user actions like clicking buttons or typing text.
Developing a Visual Basic program follows three main steps:
- Design the user interface with controls
- Determine which events the controls should recognize
- Write event procedures to handle those events
Visual Basic offers several important controls for building interfaces:
- Text box controls for input and output
- Button controls that users click to trigger actions
- Label controls to identify other interface elements
- List box controls to display multiple items
💡 Think of your program interface as a conversation with the user. Each control is a way for users to communicate with your program or for your program to communicate back.
The interface design is crucial—a well-designed interface makes your program intuitive and easy to use, regardless of how complex the underlying code might be.

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
Visual Basic Screen and Controls
The Visual Basic development environment contains several key parts:
- Form Designer where you visually create your interface
- Toolbox containing controls you can add to your form
- Properties window for customizing controls
- Solution Explorer to manage project files
You can place controls on your form in four different ways:
- Double-clicking the control in the toolbox
- Dragging and dropping from the toolbox
- Clicking the control and then clicking on the form
- Clicking the control and then dragging on the form
Text Box controls are versatile elements used for both input and output. When using text boxes for output only, set the ReadOnly property to True to prevent users from changing the displayed information.
Controls can be adjusted using the sizing handles that appear when you select them. These small squares let you resize controls precisely to fit your interface design needs.

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
Working with Control Properties
Every control in Visual Basic has properties that determine its appearance and behavior. The Properties window displays all available properties for the currently selected control.
For text boxes, important properties include:
- ReadOnly: Determines if users can modify the content
- ScrollBars: Adds scrolling capability for large text
- TabIndex: Sets the order controls are selected when pressing Tab
- Text: The content displayed in the text box
- TextAlign: Controls how text is aligned (left, center, right)
The Properties window is divided into two columns—the left shows property names, and the right displays their current values. The description pane at the bottom provides helpful information about the selected property.
When a control is selected, sizing handles appear around it, allowing you to resize it by dragging. The Tasks button provides quick access to common operations for the selected control.

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
Setting Control Properties
Every control has properties that determine how it looks and behaves. Some of the most commonly adjusted properties include:
- Text: The text displayed on or in the control
- AutoSize: Whether the control automatically resizes to fit its content
- Font.Name and Font.Size: The typeface and size of text
- ForeColor: The color of text
- BackColor: The background color of the control
- ReadOnly: For text boxes, prevents user editing
To change a property:
- Select the control
- Find the property in the Properties window
- Enter a new value or select from available options
🔧 Mastering the Properties window is crucial for efficient development. Learning keyboard shortcuts for common property adjustments can significantly speed up your workflow.
The Font property requires special handling—click on the ellipsis (...) button to open the Font dialog where you can select the font family, style, and size all at once.

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
More Essential Controls
Button controls are the workhorses of Visual Basic applications. The button's Text property sets its caption, which should clearly indicate what happens when clicked. For example, a button that calculates totals might be labeled "Calculate" or "Compute Total."
Label controls help users understand your interface by identifying what other controls are for. Some important label properties:
- The Text property sets what the label displays
- By default, the AutoSize property is True, making labels resize automatically
- Setting AutoSize to False lets you manually resize labels for multi-line text
The Font dialog gives you complete control over text appearance:
- Select font families from the left list
- Choose styles (Regular, Bold, Italic) from the middle list
- Set the size from the right list
- Preview your selections in the sample box
After making your font selections, click OK to apply them to your control. A well-chosen font enhances both readability and the professional appearance of your application.

Sign up to see the content. It's free!
- Access to all documents
- Improve your grades
- Join milions of students
Advanced Controls and Naming Conventions
List Box controls display multiple items, making them perfect for showing several results at once. Users can select items from the list, making it interactive.
The Name property is crucial for programming—it's how you'll refer to controls in your code:
- Always use the three-character prefix convention (btn, lbl, txt, lst)
- Follow the prefix with a descriptive name (btnCompute, txtAddress)
- Good naming makes your code more readable and maintainable
When designing your interface, consider font choices carefully:
- Proportional fonts like Microsoft Sans Serif use different widths for different characters
- Fixed-width fonts like Courier New use the same width for every character
- Use fixed-width fonts when creating tables or when alignment matters
💡 The Auto Hide feature helps manage screen space by automatically collapsing windows like the Toolbox when not in use. Look for the push pin icon—horizontal means Auto Hide is enabled, vertical means it's disabled.
Remember that a well-designed interface with consistent naming conventions makes your program easier to use and your code easier to maintain.
We thought you’d never ask...
What is the Knowunity AI companion?
Our AI companion is specifically built for the needs of students. Based on the millions of content pieces we have on the platform we can provide truly meaningful and relevant answers to students. But its not only about answers, the companion is even more about guiding students through their daily learning challenges, with personalised study plans, quizzes or content pieces in the chat and 100% personalisation based on the students skills and developments.
Where can I download the Knowunity app?
You can download the app in the Google Play Store and in the Apple App Store.
Is Knowunity really free of charge?
That's right! Enjoy free access to study content, connect with fellow students, and get instant help – all at your fingertips.
Most popular content in Computer Science / Programming
3AP Computer Science Principles Full Review
a full review to prepare for the AP CSP exam
HTML tags, codes, definition
HTML tags, codes, and definition with examples
Intro to Python Pt 1
This is a summary of the basics of python such as variables, print, and if statements.
Most popular content
9Origins and Dynamics of the Columbian Exchange
Analyze the ecological and economic motivations behind the initial transfer of goods, people, and diseases between the Old and New Worlds.
Introduction to Early Cultural Interactions
Analyze the initial social and religious encounters between Europeans, Africans, and Indigenous peoples in the colonial Americas.
Origins of Ancient River Civilizations
Analyze the environmental factors and technological innovations that led to the rise of early states in Mesopotamia, Egypt, and the Indus Valley.
Motivations for European Exploration
Analyze the economic, religious, and political factors that drove European powers to the Americas during the 15th and 16th centuries.
Foundations of Ethical Guidelines in Research
Practice the core principles of the APA ethical code including informed consent, debriefing, and the role of Institutional Review Boards.
Introduction to Native American Societies
Examine the diverse social, political, and economic structures of North American indigenous groups prior to European contact.
Introduction to Biological Elements of Life
Practice identifying the essential elements including carbon, nitrogen, phosphorus, and sulfur that compose biological macromolecules.
Introduction to the Spanish Encomienda System
Explore the fundamental economic and social structures of the Spanish colonial system, focusing on the encomienda and the casta social hierarchy.
Origins and Continuity of the Byzantine Empire
Analyze the political and cultural transitions from the Roman Empire to the Byzantine Empire, focusing on the reign of Justinian I and his code.
Can't find what you're looking for? Explore other subjects.
Students love us — and so will you.
The app is very easy to use and well designed. I have found everything I was looking for so far and have been able to learn a lot from the presentations! I will definitely use the app for a class assignment! And of course it also helps a lot as an inspiration.
This app is really great. There are so many study notes and help [...]. My problem subject is French, for example, and the app has so many options for help. Thanks to this app, I have improved my French. I would recommend it to anyone.
Wow, I am really amazed. I just tried the app because I've seen it advertised many times and was absolutely stunned. This app is THE HELP you want for school and above all, it offers so many things, such as workouts and fact sheets, which have been VERY helpful to me personally.