Logo en.artbmxmagazine.com

Introduction to programming in visual basic

Table of contents:

Anonim

Microsoft Visual Basic 6.0.

The design of applications has changed dramatically in recent years and consequently the programming styles, from sequential programming, went from modular programming, to arrive at structured programming with very good foundations. From structured programming, efforts focused on enhancing modularity and code reuse, which led to object-oriented programming. But that the styles have changed, does not mean that the last one eliminates the previous ones, on the contrary they rely on them.

PROGRAMMING STYLES

Programming styles are understood as the methods that exist to improve the quality of computer programs.

  1. The program must work The program must be smooth The program must be well documented The program must be efficient.

PHASES OF THE PROGRAMMING PROCESS

Every time we consider programming a certain problem, it is convenient to do it in an orderly fashion, following the phases indicated below:

  1. Problem analysis: this is knowing the problem before proceeding to develop it. Solution development: There is an unfortunate tendency for programmers to succumb to the deceptive appeal of the machine by starting the build and installation phase before the problem is really solved.Construction of the solution in the form of a program: this process is completely mechanical, since it consists of the construction in the form of a real program of the solution developed in step 2 following the rules of the programming process.Test: every programmer expert mentally tests each instruction. The only way to prove that a program works correctly is by examining all possible cases. Documentation: it is essential for the manipulation of the program as well as for its maintenance within the programs.

VISUAL BASIC DEVELOPMENT ENVIRONMENT

Visual Basic provides several tools to facilitate the design of any graphic application, in this interface the following elements are distinguished.

  1. Menu Bar: displays the commands that you use to develop an application Contextual menu: a contextual menu is a floating menu that presents specific commands, relative to a certain object. Toolbar: facilitates quick access to the most common commands used. The toolbars can be docked below the menu bar to float by selecting the vertical bar of the left button and dragging it out of the menu bar Project Explorer: the set of all files (forms, modules) that make up an application are called projects: Properties window: each object is associated with a set of properties (name, position, size, color, etc.) Toolbox:provides a set of tools that allow you to place the controls on the form during the design of the graphical user interface.

FORMS

Now we will talk about forms and projects in Visual Basic.

What is a form?

It is a window on which we draw the elements that the user has to use to communicate with the application.

But what are those elements?

They are the controls, these are the graphics that allow you to enter or display data, such as: text boxes, buttons, labels, frames, lists and timers. Therefore it should be noted that the form plus the controls and form the interface or communication medium.

Let's see some options that a form is made of.

  • Pointer: it is used to manipulate the existing controls on the form. Image box: it is normally used to present graphics to act as containers for other controls. Label: when we want a text of one or more lines that cannot be modified by the user.Text Box: it is an area within the form in which the user can view or write text. Frame: a frame is used to enhance the appearance of the form, sometimes we use frames to group related objects together. Click button: it has an order associated with it, this order will be executed when the user clicks on the button. Checkbox: it is used to select an option, in this way you can select several options in a group. Option button:is used to select one option from several. This way, only one option can be selected from a group of them. Drop-down list: combines a text box and a list. It allows the user to type what they want, select or choose an item from a list. Timer: allows activating processes at regular intervals of time. It should be noted that they are written in milliseconds. Directory list: It is used to display the directories to which the user can move.It is used to display the directories that the user can move to.It is used to display the directories that the user can move to.
Introduction to programming in visual basic