word number: 1818
Time: 2021-03-01 14:29:27 +0000
This is my Visual Programming assignment that I translated to English myself during my undergraduate study at the Department of Electrical Engineering, Udayana University, 2011. Indeed, this assignment is far behind times but it can be an entertainment in the future where Visual Basic sophistication is very advanced and when seeing this assignment, old programmers will feel nostalgic and young programmers will be surprised at how underdeveloped Visual Basic was then. This assignment has never been published anywhere. I and Muhammad Audy Bazly, as the author and copyright holder, license this task with CC-BY-SA where anyone can share, share, republish and sell on condition to state name us as authors and let us know that the original and open versions are available here.
Basic language is basically a language that is easy to understand so programming in the Basic language can be easily be done even by people who are just learning to program. This is even easier after the presence of Microsoft Visual Basic, which was built from the idea of creating a simple and easy scripting language for the graphic user interface developed in the Microsoft Windows operating system.
Visual Basic is a programming language that is very easy to learn, with visual programming techniques that allow users to be better creative in producing an application program. This can be seen from the basic creation in Visual Basic is FORM, where users can set the appearance of the form and then run it in a very easy script. The explosion in the use of Visual Basic is marked by the ability of Visual Basic to be able to interact with other applications in the Windows operating system with ActiveX Control components. With this component it allows users to call and use all existing data models in the Windows operating system. This is also supported by programming techniques in Visual Basic which adopt two types of programming, namely Visual Programming and Object Oriented Programming (OOP). Visual Basic 6.0 is actually a development from the previous version with several additional components that are currently trending, such as internet programming capabilities with DHTML (Dynamic HyperText Mark Language), and several additional database and multimedia features that are getting better. Until the time this book was written, it can be said that Visual Basic 6.0 is still the first choice in making application programs that exist in the national software market. This is due to the ease in carrying out the development process of the application being created.
The Visual Basic 6.0 interface contains menus, toolbars, toolboxes, forms, project explorer and properties as shown in Figure 1 below.:
Figure 1 Visual Basic 6.0 interface
Making an application program using Visual Basic is done by making an application display on the form, then given the program script in the required components. The form is composed of components that are in the [Toolbox], and each component that is used must have its properties set via the [Property] window. Menus are basically standard operations in the Windows operating system, such as creating new forms, creating new projects, opening projects and saving projects. In addition, there are visual basic usage facilities on the menu. For more details, Visual Basic provides a very complete and detailed help in MSDN.
The toolbox contains components that can be used by an active project, meaning that the contents of the components in the toolbox really depend on the type of project being built. The standard components in the toolbox can be seen in Figure 2 below.
Figure 2 Standard Components in the Toolbox
The functions of the control components in the ToolBox in Visual Basic:
The basic concept of Visual Basic 6.0 programming is making forms by following the property, method and event programming rules. This is means:
To start making application programs in Visual Basic, what is done is to create a new project. Project is a set of forms, modules, functions, data and reports used in an application. Creating a new project can be done by selecting the [File] » [New Project] menu or by pressing the [new project] icon on the Toolbar which is located in the upper left corner. After that a confirmation will appear for the type of project from the application program that will be created as shown in Figure 3 below.
Figure 3 Project type selection screen
Visual Basic 6.0 provides 13 types of projects that can be created as shown in Figure 3 above. There are several projects that are commonly used by many Visual Basic users, including:
Then select Standard EXE and press [Ok]. Then the display of Standard Exe appears as shown in Figure 1. Thus the project is ready to be created. In making the previous project double click on the form created so that there is a hidden window in the form of a window for programming or a code window. This can be done by selecting the icon for the form window or the code window in [Project Explorer]. This can be seen in Figure 4 and Figure 5.
Figure 4 Form Window
Figure 5 Code Window
In the form window, the user builds the appearance of the application program that will be created by adjusting the components both their location, properties and events. To retrieve a component from the [Toolbox], you can click on the component, then click or drag it to the correct position on the form. For example, taking a label from the Toolbox can be done in a way like Figure 6 below.
Figure 6 Retrieving labels from the Toolbox
The steps for retrieving a label from the toolbox to attach it to the form are as follows:
Note: don’t forget to set the property name of each component used, because name is the identity of the object that will be used in writing the program. The next step is to provide text on the label, for example “Hello world”, then select the Caption property, and fill it with Hello world. The program display results are as follows:
Figure 7 Layout on the Form
And to run the program, click the Run icon () on the toolbar or select the [Run] » [Start] menu, or by pressing the [F5] key. So that the program results are:
Figure 8 Program Results
In Figure 9 is an example of a program that we made, namely the calculation of free space loss to calculate the loss of signal strength in the air. The method is the same as just adding formulas. Program is available at Github.
Figure 9 Free Space Loss Program