Sei sulla pagina 1di 36

Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Mark Gil M. Balisnomo

July 2019
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Mark Gil M. Balisnomo


markgilbal31@gmail.com
09091867140

PERSONAL INFORMATION
Birthdate : January 31.1999
Birthplace : Banga Caves, Ragay, Camarines Sur
Address : Cabinitan, Ragay, Camarines Sur
Gender : MALE
Height : 5’6 ft
Weight : 55 kl
Civil Status : Single
Religion : Roman Catholic

SKILLS
 Troubleshoot a computer hardware
 Operate computer software
 Draw or Design in photoshot or doing some artworks

EDUCATIONAL ATTAINMENT
Primary Education Banga Elementary School
Banga Caves, Ragay, Camarines Sur
2006-2012
Secondary Education Don M. Gonzalvo Memorial High School
Cabinitan, Ragay, Camarines Sur
2012-2018
Tertiary Education Polytechnic University of the Philippines
Lower Sta. Cruz, Ragay, Camarines Sur
2018 upto Present
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology


Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Introduction

Visual Studio, also known as Microsoft Visual Studio and VS, is an integrated

development environment for Microsoft Windows. It is a tool for writing computer

programs, websites, web apps, and web services. It includes a code editor, debugger, GUI

design tool, and database schema designer, and supports most major revision control

systems. It is available in both a free "Community" edition as well as a paid commercial

version.

Visual Studio supports 36 different programming languages and allows the code

editor and debugger to support (to varying degrees) nearly any programming language,

provided a language-specific service exists. Built-in languages include C, C++, C++/CLI,

Visual Basic .NET, C#, F#, JavaScript, TypeScript, XML, XSLT, HTML, and CSS.

Support for other languages such as Python, Ruby, Node.js, and M among others is

available via plug-ins. Java (and J#) were supported in the past.

The most basic edition of Visual Studio, the Community edition, is available free

of charge. The slogan for Visual Studio Community edition is "Free, fully-featured IDE

for students, open-source and individual developers".


Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

How to install Microsoft Visual Studio?

Figure I. Visual Studio exe. File


1. Locate your intaller pack for Visual Studio.
2. Find the exe. File and then double click.

3. You can browse where you


want to install your Visual Studio
and after that, read the terms and
conditions and then check “I agree
to the License terms and
conditions”. Click Next and then
proceed to the next step.

Figure II. Agree to the terms and conditions


Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

4. Here are some features that are packed


inside the intaller, it contains different languages.
You can check “select all” or you can customize
your installation. Click INSTALL to continue the
installation process.

Figure III. Customize Features

5. Wait until the installations are done. Play


your music for a while while waiting because it
takes a lot of time to finish this.

FigureIV. Installing package


Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

6. Now the setup is completed. You can now


start writing your code just by Launching the Visual
Studio.

Figure V. Setup Completed

Figure VI. Visual Studio Home Screen

Sample Visual Basic Programs


Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 1: Sample Assignment Testing

In Figure 1, The design contains four object. As you see, there are three labels
but what’s more important is the label which contains the name “Mark Gil M.
Balisnomo”. Why? It is because it has a value behind it if you click the Assignment Test
button. The code inside the button are shown in Figure 2.

Figure 2: Sample Assignment Testing Code

In Figure 2, It says that “lblIcons.Text” which has the Text “Mark Gil M.
Balisnomo” can be change by some value. This Label is equal to totalweight, totalweight
is equal to containerWeight A and B, while the containerWeight A is equal to
METRICTION which has the CONSTANT VALUE of 1000 and the containerWeightB
that has an equal value to A. Therefore, totalweight is equal to 1000+1000. It concludes
that Text =Mark Gil M. Balisnomo will be replaced by 2000.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 3. Using Variation to Store Information Results and Redundant data

In Figure 3, Aside from having several labels in it, each label in a parallel list has
different values that could be integers, string and double the are only be implement if you
click the button “Compute Invoice”. In figure 4, you will see that there are invisible label
that will be the form to fill with.

Figure 4. Using Variation to Store Information Results and Redundant data Code

In Figure 4, you will see that the lblCustomer.Text is equal to Mark Gil M.
Balisnomo with double qoutes(“”) on it. Therefore it is considered to be string. In some
labels, there are plenty of number. You could notice that there is no double qoutes on it
considering that it is not a string type but integers because it is valued a whole number.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 5. Typographical Errors in Variable Names

Let us recall figure 3 and 4, we have these same labels’ text and labels’ namehere
but there are some errors that we encountered in it by having a Variables that are not
Identify by Dim. For Example, we declare CPUPRICE = 1450. It doesn’t run the code
because it is not Identify Dim CPUPRICE As Integer. Therefore, in figure 5 there has no
applicaton that will run and so we try to fix these and the code would be and should be
having Identifier as the figure 6 have shown below.

Figure 6. Typographical Errors in Variable Names Code

In figure 6, you will see that we revise the code. We added Dim CPUPRICE As
Integer, MONITORPRICE As Integer, KEYBOARD As Integer, SALESTAXRATE As
Integer so the program will run just like the Example 3.2 in figure 3. In here, the are
few formula that are different from Example 3.2 but we expect that you will understand
what you’ve seen.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 7: Local Variables

In figure 7, as you can see there are two buttons having its text “Get My Name”
and “Show My Name” and for the third time, we uses invisible label to Show My Name
after clicking the two buttons yet, Figure 8 will show field for the Variables that is being
repeated.

Figure 8: Local Variables Code

In figure 8, here you can see that there is a green line under the variable because it
is being identified repeatedly. It means that the variable in Private Sub btnGet_Click have
loss the value that have been declared in the firstplace because of reidentifying it. It could
be still runnable but it will never Show “Mark Gil M. Balisnomo” when you click “Show
My Name” Button. To run the program, you can move on to the figure 9 to show how it
should.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 9:Module-Level Variables

In figure 9, you can see the same format as figure 7. It is asking for name which
should be declared in Get My Name button. Same format but different code because it
uses only one Identified Variables in Dim statement.

Figure 10:Module-Level Variables Code

In figure 10, it shows that under the Class in a Form, you should Identify the
variable only once. There is no such thing as replacing the value of a variable in it.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 11. Hidden Module-Level Variables

In this figure, you can only notice that there is only a few change in format
compare to figure 9. It is only added by one label having its text “What’s your name”, but
there is no difference between the two programs that are mentioned.

Figure 12. Hidden Module-Level Variables Code

There we have these codes that are not different from the earlier program that
have been tackled, but there is only one thing that it wants us to know. Having a large
number of objects to be access with, also gives a large number of codes to input.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 13. Global Variables

In this figure, we are getting more objects to manipulate. There you see two forms
in one program to separate what have been tackled earlier in figures 7, 9, and 11. The
question is, How can we declare a variable we Identify from class in a form A to form B?
Let’s see how it works in Figure 14.

Figure 14. Global Variables Code

This one is quite different from the recent program in terms of having the property
of one variable to be called out in other form. In this case, the variable ShowMmory
have been Identify as a Public property in Public Class frmComp2 and have been called
out for the variable Ddr to get its value. And that is how it does.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 15. Lifetime of Local Variable

In figure 15, we are again looking for some value that should be continouosly
increasing in numbers. To understand this figure more, let’s move to figure 16. Lifetime
of Local Variables Code.

Figure 16. Lifetime of Local Variable Code

Here is the code we get, but there might be a problem when it was run the
program. There always having the result of 0 value of the label. It saids that label.Text is
equal to the variable we gave but the problem is, we haven’t yet declared any value for
that variable so it turns to 0. It also saids that the variable is equal to 15 but it is declared
after the declaration of the label .Text so it becomes useless.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 17. Lifetime of Module-Level Variables

Again, the form Design has the same format compare to figure 15, but this time
we’d be able to run the program by doing a few change in positioning of the codes. To
make it short, the codes were shown below in figure 18.

Figure 18. Lifetime of Module-Level Variables Code

We uses dim statement before the code for the button, this is how we troubleshoot
the recent program. This time, there has a change in output, but there still have problem
because it valued from zero then end with 15 in just one click. to make it clearer how to
do the incrementing of value. Let’s move on to figure 19. Static Variables
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 19. Static Variables

In this figure, there is a invisible label again to display the value of an integer by
incrementing its value. In order to understand. See how it is different from the recent
program in firgure 20.

Figure 20. Statice Variables Code

This figure has figure out that we could use Static statement instead of Dim
statement in incrementing a value of a number. And also, the formula is important to
make it increasing. In here, the variable IP declares that IP is equal to IP + 1. Which
explain the condition that IP + 1 will be the nwe value of IP.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Basic Calculator: Multiplication, Division, Addition and Subtraction

Figure 21. Calculator

It is the basic way of making a calculator in terms of operation. Each operation is


separated so if you wish to calculate for the product only, you can use Multiplication. But
in this figure, it is not yet done to manipulate to which form the user would like. It only
work in sequently because you can’t escape one of the operation. Though the program
have some missing button to link for the user’s desire,there is just one thing. The only
purpose of this program is to explain how the algorithm should be use in every operation.

Figure 22.1 Addition Operation in Visual Basic


In this figure, you can see that I am using the variable msgBxResultMonitor As
string, but before converting the Value of txtHDD, txtCD and txtDDR.Text to string, the
adding operation are being applied.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 22.1 Subtraction Operation in Visual Basic

In this figure, you can see that I am using the variable msgBxResultMonitor As
string, but before converting the Value of txtHDD, txtCD and txtDDR.Text to string, the
subtracting operation are being applied.

Figure 22.3 Multiplication Operation in Visual Basic

In this figure, you can see that I am using the variable msgBxResultMonitor As
string, but before converting the Value of txtHDD, txtCD and txtDDR.Text to string, the
Multiplying operation are being applied.

Figure 22.4 Division Operation in Visual Basic

In this figure, you can see that I am using the variable msgBxResultMonitor As
string, but before converting the Value of txtHDD, txtCD and txtDDR.Text to string, the
Dividing operation are being applied.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 23. Using the InputBox() Function

In this figure, there are only seven object that I put in there. There is a label that
displays the phrase in Example 4.1. There are three labels for the inputted integers and an
answer. There is also a picture to illustrate the right triangle and a label(which functioned
as a button) to show the value of hypotenuse.

Figure 24. Using the InputBox() Function Code

The formula above can also be written like C=Sqrt(a2+b2).


Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 25. Using the MsgBox Statement

In this figure, it has less object that are applied. It has only two label. You can
also see that it has a different icon. To modify, just click the form and find the Icon
property using the property window.

Figure 26. Using the MsgBox Statement Code

As you can see as the code from figure 24, it has the same formula, but the thing
is how it will appear in a runtime. In figure 25, it saids that it is the use of the MsgBox
Statement. In order to displace some string or value, just type” MsgBox” and inside the
“()” function is the variable or simply the string that is assisted by the double qoute (“”).
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 27. Using Cyclic Sequence

In this figure, there are objects, one for the display of the title, one for the
execution of the sequence which should be the invisible one, and the label that
functioned as a button.

Figure 28. Using Cyclic Sequence Code

In this code, it indicates iteration of number from 0 in count of 4. The iteration


should be like these – 0, 1, 2, 3. It end in three because it would be the 4th number in
these sequence.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 29. Generating Random Numbers

In this figure, there are objects, one for the display of the title, one for the
execution of the sequence which should be the invisible one, and the label that
functioned as a button.

Figure 30. Generating Random Numbers Code

In this code, there is a new function which is the Rnd(). The message box will
show random number that is multiplied by 10 as the figure above had shown.

Figure 31. Overflow


The form above would be the design to perform the overflowing of number rather
than the original inputted numbers.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 32. Overflow Code


If you’ll run the program, you can also sure guess what would be the code
because everytime you’ll input any numbers, you’ll notice that it is just multiplied by
1000.

Figure 33. Roundoff


In this figure, it focuses on the rounding off the number. Once the program starts
running, you can click enable or disable to start and stop counting while it shows
rounding off of decimals.

Figure 34. Roundoff Code


In this code, it reveals that, once you click the enable label/button, it appears that
the enabled will turn to true, and if you click disable, the enabled will turn to false. It is
one of the algorithm I putted in it. For the formula, the iteration will be increasing by 0.01
to show how it is rounding off.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 35. Significant Digits

In this figure, there are objects, one for the display of the title, one for the
execution of the sequence which should be the invisible one, and the label that
functioned as a button.

Figure 36. Significant Digits Code

In this code, it shows that there are some numbers that have been in an adding
operation which is commonly use, but the answer should be in the right format. The code
shows should the format should be.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 37. Converting String to Numbers

In this Figure, you will notice that the title is “Converting String to numbers” that
means even you have inputted an uninteger, it will be accepted and calculated. Just incase
you put a string, don’t expect to have a result other than Zero.

Figure 38. Converting String to Numbers

As the caption in Figure 37 have said, this code will shows the value, an integer if
it is a number, or a string if it is a string. What ever you will be inputted should be base
on their value as integer or as a string.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 39. Using String Concatenation

In this Figure, we are only focusing on the concatenation of two or more strings.
How can be the string connected with each other? There must be a proper way in doing
that. To understand what way can we display those strings at once, let us proceed to
Figure 40.

Figure 40. Using String Concatenation Code

In this code, you will understand how string concatenation works. As you can see
in the Figure 40, there are two inputbox that should be a string type and another two
strings which is already declared. The third variable has a different type of declaration,
there has a simple algorithm which combine the first two variable at once, in what way?
Yes there is a separator between them. It is the “&” or And.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 41. Using the Format$() Function

In this figure entitled Using the Format$() Function makes the numbers visible in
different format. There we have the decimal, whole number, currency, and a percent.

Figure 42. Using the Format$() Function Codes

to make it short, the above code will be guiding you on how to show what ever
format you need on your program.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 43. Trimming Spaces

Rather than making an invisible label to show some output, we uses a messagebox
to show output. But what really matter is the trimming or cutting of the strings, the code
for the Trim Test label/button is shown below in Figure 44.

Figure 44. Trimming Spaces Code

Here you can see that there are some Variables containing some strings. There has
a lot of spacing in the first variable so it has to be trim. The function for that is LTrim for
Left Trim, RTrim is for Right Trim while the Trim is supposed to be both side.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 45. Manipulating Names

In the first look, you can easily notice that there is a manipulation which you can
see in the label/button. If you run this program, it will ask for the your name which
should be the lastname first then comma and then the firstname. And it will appear to be
the reverse as the Firstname first before the Lastname.

Figure 46. Manipulating Names Codes

So what makes the Firstname and the Lastname swap its poition. If you run the
program, you will notice that comma is a must. Without comma, there will be no
inversion at all. It is in the code that the first variable is declared to be; if the comma is
after the string, then it should be the second string. Vice Versa.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 47. Using Camage Return and LineFeed

There are some difference between this and the recent program. There is an array
in a variable which will appear two phrase at once.

Figure 48. Using Camage Return and LineFeed Code

In this code, using Chr() Function, it appears that the it having a first array that
can contain strings which is in a position of line 1, and the second array also can contain
strings which is in a position of line 2.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 49. Using Multi-Line Messages and vbCrLf

In this Figure, there are two functional button which are the Label and the Picture
box. These two objects have the same funtion. So in order to execute the program, you
have to click either the Picture box or the Label.

Figure 50. Using Multi-Line Messages and vbCrLf Code

In this Code, it is inspired from what you see in the internet when downloading
any file. There are two buttons which has the same type of execution during the run time.
For example, the Download Button and the click here to download which is the Label.
You can also notice that the code Hide itself when the input box appears, its Idea is to
have less distraction while running the program.
Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 51. Using Single Encryption

Figure 52. Using Single Encryption Code

Figure 53. The Text Box’s Text Property


Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 54. The Text Box’s Text Property Code

Figure 55. The Change Event

Figure 56. The Change Event Code

Figure 57. True or False


Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 58. True of False Code

Figure 59. Assignment versus Equality Comparison

Figure 60. Assignment versus Equality Comparison Code

Figure 61. Type Mismatch

Figure 62. Type Mismatch Code


Polytechnic University of the Philippines

Ragay Branch

Bachelor of Science in Information Technology

Figure 63. Using Logical Operation

Figure 64. Using Logical Operation Code

Figure 65. Using the IIf() Function

Figure66. Using the Iif() Function Code

Potrebbero piacerti anche