• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » VB » Visual Basic

What are the three steps for planning and creating Visual Basic project? Describe what happens in each step

By Dinesh Thakur

To write a Visual Basic project you follow the three step process for creating the project and then repeat the project for creating the project. The three step involves setting up user interface, defining the properties, and creating code.

 The Three-Step Process as follows:

Planning:  

Design the user interface: When you plan the user interface, you draw a sketch of screens the user will see when running your project. On your sketch, show the forms and all the controls that you plan to see. Indicate the name that you planed to give the form and each of objects on the form.

Plan the properties: For each object, write down properties that you plan to set or change during the design of the form.

Plan the basic code: This step is where you plan procedures that will execute when your project runs. You will determine which events require action to be taken and then make a step-by-step plan for those actions

Programming: 

After you have completed the planning steps and have agreement form your user, you are ready to begin the actual construction of the project. You will use the same three steps process that you used for planning.

Define the user interface: When you define the user interface, you create the forms and controls that you designed in planning stage.

Set the properties: When you set the properties of objects, you give each object name and define such attributes as the contents of the label, the size of text, and the words that appear on the top of command button and in the form’s title bar.

Write the Basic Code: You will use Basic programming statements to carry out the actions needed by your program. You will be surprised and pleased by how few statements you need to create powerful Windows program.

What is the purpose of Visual Basic file types: .vbp, .frm, .bas, and .ocx

By Dinesh Thakur

Visual Project consist of at least two, and usually more, files as follows:

 .vbp file: This file is called the project file, is a small text file that holds the names of the other files in the project, as well as some information about the VB environment.

.frm file: Each of your form in the project is saved in a file with extension. To begin your project your project will have only one form. Later you can expect your projects to have several forms, with one .frm file for each form. A from holds the description of all objects and their properties for each form, as well as the basic code that you have written to respond to the events. These are also referred as form modules.

.bas file: Optionally your project can have this file. These file holds basic statements that can be accessed from any form. As soon as you begin .bas file are called standard code modules.

.ocx file: additional controls, called custom controls, are stored with a file .ocx extension. If you include controls in your projects that are not part of the standard control set, the .ocx file names will be included in the project.

.vbw file: After you save a project, Visual Basic automatically adds one more file to your project with extension of .vbw. This file holds information about each project’s form.

 

When is Visual Basic in design time? Run time? Break time

By Dinesh Thakur

Visual Basic has three distinct modes. While you are designing the user interface and writing code, you are in design time. When you are testing and running project, you are in run time. If you get an error or pause project execution, you are in break time.

What is purpose of name property of control

By Dinesh Thakur

Every control has it’s properties one of the common properties of controls is name property. Name property is the one by which the control is identified and it is referred as the object name of that control.

By using name property programmer can access the other properties of the controls and methods as well at run time.

 

Visual Basic gives default name to the controls which can be later changed by changing it’s name property at the design time or urn time.

 

Which property determines what appears on the form for Label control

By Dinesh Thakur

Caption property of the Label control determines what will appear on the Label control.  This Caption property is changed at run time or design time.  Use can not change the Caption property of the Label control.

 

 

What is the purpose of the Caption property of the Command button? And Caption property of the Form

By Dinesh Thakur

Command button has a Caption property which is used to display a text on the top of Command Button.

Form object also has the Caption property. This property displays the Caption text at the title bar of the window.

 

This property can be changed run time or design time. But it cant be changed directly by the end user.

 

What does cmdPush_Click() mean? To what does cmbPush refer? To what does Click refer

By Dinesh Thakur

Visual Basic is event driven programming language. Over here cmdPush_Click() is a event procedure, which belongs to cmdPush command button object.

 

Visual Basic automatically names your event procedures. The name consist of the object name, an underscore(_), and the name of event. For example: the click event of command button called cmdPush will be cmdPush_Click().

 

This procedure will be executed when ever Click event of the cmdPush command button is fired.

 

When you will click on the cmdPush command button at the run time the statements with in the cmdPush_Click() event procedure will be executed.

 

 

What is Visual Basic Event? Give Some Examples of Events

By Dinesh Thakur

While your project is running, the user can do many things, such as move mouse around; click on either button; move, resize or close your form’s window; or jump to another application. Each action by the user causes an event to occur in your Visual Basic Project.

Some events you care about, and some events you don’t care about. If you write Basic code for particular event, then Visual Basic will respond to the event automatically execute your procedure. VB ignores events for which no procedures are written.

Visual Basic automatically names your event procedures. The name consist of the object name, an underscore(_), and the name of event. For example: the click event of command button called cmdPush will be cmdPush_Click().

 

What is compile error, time error, logical error,, when does it occur, and what might it cause it

By Dinesh Thakur

Visual Basic convert your project to machine language, it finds any compile errors. You get compile errors when you break the syntax rules of Basic and sometimes when use an illegal object or property.

 For example, try spelling End as end or using the world Quit instead of End. The compiler can only translate the seat spelling of the world and cannot recognize either of these words both cause the compile time error message box.

 

You also receive compile error if you accidentally use the wrong punctuation or place the punctuation in the wrong place. The compiler cannot understand lblMessage,Caption or lblMessage.Caption;

 

The editor might find compile errors as you move of offending line. Or the compile error may not be found until you try to run the project. Before Visual Basic can actually run your project, it attempts compile the code into machine language. If VB finds compile errors, it displays Code window, highlights the offending line, and enters break time.  After you have corrected your compile errors, you can click on run button to continue the compilation and running project.

 

If your project halts during execution, that’s a run-time error. Visual Basic displays a dialog box, goes into break time, and highlights the statement causing.

 

The statement that cannot be executed correctly cause run-time errors. The statements are correctly formed Basic statement fail to execute.

 

Run time error can be caused by attempting to do impossible  arithmetic operation such as calculate with non-numeric data, divide by zero, or find the square root of negative number.

 

With logical errors your projects runs but produces incorrect results. Perhaps the result of a calculation are incorrect or the wrong text is OK but appears in wrong location.

 

If the project runs, it must be right-right? All too often, that statement is not correct. You may need to use calculator to check the output. Check all aspects of the project.

 

For example, the you want to print hello world but you are giving some incorrect message at the wrong place it will not give out put as you expected and it causes the logical error to solve these kinds of errors you must check the code carefully.

 

What is a tooltip ? How can you make it to appear

By Dinesh Thakur

If you are a windows use,you probably appreciate and rely on ToolTips,those small labels that pop up when you pause your pointer over a toolbar button or control.You can easily add ToolTips to your projects by setting the ToolTip Text property of any control that you want to display a ToolTip.

To define a ToolTip for a command button, add a new command button to a form .Change the button’s Caption property to Exit and set its ToolTipText Property to “Close and Exit the program “.Now run the project , point to the Exit button , and pause ; the ToolTip will appear.

« Previous Page

Primary Sidebar

Visual Basic Tutorial

Visual Basic Tutorial

  • VB - File Types Purpose
  • VB - Events
  • VB - Ole
  • VB - Controls Properties
  • VB - Project Steps
  • VB - Pretest Vs Posttest
  • VB - IDE
  • VB - Record Set
  • VB - Common Dialog Box
  • VB - Val Function
  • VB - Sub Vs Function Procedure
  • VB - Terms
  • VB - User Interface Elements
  • VB - Objects and Modules
  • VB - Variable’s Scope
  • VB - Message Box
  • VB - Data Vs Data-bound Control
  • VB - Branching Statements
  • VB - Do/Loop and For-Next Loop
  • VB - Grid Control
  • VB - Error Types
  • VB - Looping Constructs
  • VB - Relational Vs Logical Operator
  • VB - Control Purpose

Other Links

  • Visual Basic - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW