ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 04 May 2017 My Price 8.00

Visual Basic Assignment PURPOSE

i need help with this assignment (visual basic needed) 

 

 

2/6/17 Due Date: _________________________
MT. SAN ANTONIO COLLEGE
CISB11
Visual Basic Assignment PURPOSE:
This assignment will help you become familiar with the Visual Basic (VB) language, in developing a
stand alone Windows executable application.
With this assignment you will:
Learn some of the terminology used when working with VB and an Object Oriented
Programming language. Experience how to code, compile and test a VB Windows application within an Integrated
Development Environment (IDE).
Expand your knowledge of Windows programming possibilities.
ASSIGNMENT:
1. For this assignment you will use Visual Studio 2010, which is available on the computers in the
classroom and in the business division computer lab.
2. Open the Visual Studio (VS) environment. Visual Studio is called an Integrated Development
Environment (IDE). It is used to create, edit, and test programs. It is available on the campus lab
computers. Select Start, then All Programs, then Microsoft Visual Studio 2010 folder, then Microsoft Visual
Studio 2010. If you are asked to choose the default environment settings, select “Visual Basic
Development Settings” and then click on “Start Visual Studio”. Select “New Project” (located in the upper left corner). Make sure that “Windows” is highlighted in the “Installed Templates” area and that “Windows
Forms Application” is highlighted in the middle of the screen (as shown below). qattachments_eeb3c8b9b7cfd3b56684ff873246cfa219bc1713.docx
Page 1 VB.NET Assignment 3. On the line that says Name change, change the name of the project from WindowsApplication1 to
CISB11VB-XX (replace XX with your initials), then select the OK button
4. Move your mouse over the word Toolbox on the left-side of the screen, but do not click. You may see a
green rotating circle. Simply wait until the toolbox opens. The Toolbox menu contains a “push pin” to
the left of the X in the top right corner of the Toolbox window. Click on the “push pin” 5. The window should now look similar to the picture shown below. 6. To drag a toolbox tool onto the form move the cursor over the tool and push down the left side of the
mouse; with the mouse still pushed down, move the cursor over the form where you want to place the
Fall 2015 VB.NET Assignment Page 2 tool; then release the mouse. Use this procedure to drag a label and a button from the toolbox onto
Form1 as shown in the picture below. Buttons, labels and the other tools in the toolbox create objects on the form. Form1 is an object
of type Form while Label1 is of type Label and Button1 is of type Button. 7. Now we are going to set the properties. Properties are the characteristics of an object such as the size,
the color or the name of the object. Although the objects were given default names they are not very
meaningful. The values for the properties are set in the Properties Window which should be located in the
lower right corner of the IDE. Note: If you do not see the Properties Window you can go to the
View menu and select Properties Window. You select the object for which you want to change properties from the drop down list located
directly beneath the Properties Window title bar (see figure below). If Form1 is not displayed in
the object listbox, click on the down arrow to the far right of the listbox, then select the Form1
object. To set the properties in alphabetic order click on the AZ button. Tells which object you are setting. Shows the property and the value. Fall 2015 VB.NET Assignment Page 3 The properties window displays the name of each property in the left column and the property’s
value in the right column. To change a property’s value select the current value and enter the
new value.
The Text property controls what displays on the object. Change the text property of Form1 from
“Form1” to “Programmed by Your Name” filling in your name (do not type the quotes). After
you press Enter, the value you typed displays in the title bar of the form.
Select Button1 from the drop-down list (or by clicking on the button) and set the Text property to
“Color”.
Select Label1 from the drop-down list (or by clicking on the label) and change the Text property
to “Programming in Visual Basic CRN nnnnn” where CRN is your Course Reference Number.
If the words on the label run off the form, you can enlarge the form by clicking anywhere on the
form and moving the square sizing handles to the right.
Change the Font property of the label to your choice of font and size. To change the font type and
size properties, click on the label, select the font property and click on the ellipsis (…) to see a
font dialog box. Select a font type and size and then click on the “OK” button.
Change the Backcolor property of the Form to a color of your choice by selecting the form,
clicking on the BackColor property and clicking on the down arrow for the BackColor property.
You may select the Custom, Web, or System tabs to pick a color.
Although the objects were given default names they are not very meaningful. The (Name)
property appears at the top of the properties list. Change the Name property of the controls as
follows: Label1 to MessageLabel Button1 to ColorButton CRN nnnnn 8. Now it’s time to code. As you have learned in class, a program is a set of instructions telling the
computer what to do. The code in this program will be written in Visual Basic. If you make any
mistakes in the code such as misspelled words or punctuation errors you will get a squiggly line
(like the spell checker in Word). You must correct the mistakes for the program to run.
Fall 2015 VB.NET Assignment Page 4 We will write code for events. Most events occur when the user takes some action such as
dragging a mouse, clicking, or double clicking. Our first event code will occur when the user
clicks on the Color button when the program is running. To write the code, double-click on the Color button. Notice that the event is called
ColorButton_Click automatically. The event is listed to the right of the words “Private Sub.”
Your code is going to tell the program to change the BackColor of the Form while the program is
running. In general the code must assign a value to the object’s property. The proper syntax for
changing an object’s property using code is: Object.property = Value.
In our case the object is the current form which can be called Me, the property we want to change
is the BackColor property and the value will be your choice of color from the Color class. When
you type the = sign, Intellisense gives you a list of possible colors. You may pick any color you
like.
To change the form’s background color when the color button is clicked, type the following code
on the line prior to “End Sub”:
Me.BackColor = Color.Azure (remember, you can pick any color you like) Your finished code should look like this:
Public Class Form1
Private Sub colorButton_Click(ByVal sender As System.Object, ByVal e As …)
Me.BackColor = Color.Azure
End Sub
End Class 9. Now it’s time to run your program. You can press F5 or click on the green arrow on the toolbar or
select Start Debugging from the Debug menu. If you have errors you must check your code and fix the errors. If the program works, click on the Color Button to see the color change.
10. Let’s add one more button to the program. Click on the close button on the title bar of your program
(to the right of the title “Programmed by ‘your name’”) and return to the IDE. If you are in the code
window you can switch back to the form by clicking on the “Form1.vb [Design]” tab (indicated by the
below arrow). Fall 2015 VB.NET Assignment Page 5 Drag another button from the toolbox. You can line it up to the first one using the blue snap line.
When you position the new button directly above or below the color button, the magenta colored
snap line tells you when the buttons are lined up. Feel free to position the buttons as you wish on
the form.
Set the Text property of the new button to Exit and set the Name property to ExitButton.
Double-click on the button to write the code.
In the ExitButton_Click event, on the line directly above End Sub, write the code “Me.Close( )”
(without the quotation marks). This code closes both the current form and the program.
Run your program again and test your new button. 11. Add comments to your program. Comments are lines in the code that are used to document the code
for you and other programmers. Comments are not translated when the program is run. In Visual Basic, comments are preceded by an apostrophe (‘). It is good programming practice to
add comments to the top of the code to document the application and to each event explaining
what the event does. To add comments to your form position the cursor to the left of the line
Public Class Form1 and press the enter button twice. Then move the cursor to the top of the
Coding window and type the below comments within your code (indicated by bold face type).
'Programmer:
'Date:
'Class:
'Instructor:
'Description: Your Name
today's date
CISB 11
instructor's name
Demonstrates an object-oriented program. Public Class Form1
Private Sub ColorButton_Click(ByVal sender As System.Object, ByVal e …) 'Changes the background color of the form.
End Sub
Fall 2015 Me.BackColor = Color.Azure
VB.NET Assignment Page 6 Private Sub ExitButton_Click(ByVal sender As System.Object, ByVal e …) 'Ends the program.
End Sub
End Class Me.Close() 12. Save your work by clicking on Save all (multiple disks) or select Save All from the File menu.
13. Submitting your work From the File menu, press Alt + Print Screen button on your keyboard to save a copy of your
source code to the clipboard. Open Word and do a Paste (CTRL +V). Your output should appear.
Type your name under the program output, save the file with the following name:
LastName, FirstName - CRN nnnnn – Visual Basic Assignment Source Code.docx and close Word. Run your program, while your program is running press the Alt + Print Screen buttons on your
keyboard to save a copy of your form in the clipboard. Open Word and do a Paste. Your form
should appear. Save the file with the following name:
LastName, FirstName - CRN nnnnn – Visual Basic Assignment Screen Shot.docx and close Word. Open Word and copy the ten questions from the last page of this assignment. Type your name
answer the questions, and save the file with the following name:
LastName, FirstName - CRN nnnnn – Visual Basic Assignment Questions and Answers.docx and close Word. Attach the three Word files from this assignment into the Visual Basic Assignment in
Moodlerooms. The assignment is setup to allow multiple attachments and should allow you to
add the three files. Fall 2015 VB.NET Assignment Page 7 Visual Basic Questions
1) The integrated development environment (IDE) used to create, edit, and run programs in Visual Basic
is called _________________________________________________.
2) Buttons, labels, and other tools in the toolbox create __________________ when placed on the form.
3) In Visual Basic, a user action, such as dragging a mouse, clicking, or double clicking is called a(n)
_______________________________.
4) The window that contains a list of each object’s properties and their corresponding values is called the
_______________________________ window.
5) One way to change to code view from design view is to _______________________ on the object for
which you want to write code
6) The code to change the background color of a form is ______________________________________.
7) The characteristics of an object, such as its size, color, or name are called ______________________.
8) There are three ways to run a VB application. You can either click on the green arrow on the
toolbar, Select Start Debugging from the Debug menu, or __________________________________.
9) Comments in Visual Basic must be preceded by the ____________________________ character.
10) Visual Basic is (a)n __________________________________ programming language.
11) What is the Keyword of the Day as written on the white board by your instructor? (worth 50% of
your grade) Fall 2015 VB.NET Assignment Page 8

Attachments:

Answers

(11)
Status NEW Posted 04 May 2017 12:05 AM My Price 8.00

-----------

Attachments

file 1493858715-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)