BIS 311 DeVry Week 1 I Lab
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>BIS</strong> <strong>311</strong> <strong>DeVry</strong> <strong>Week</strong> 1 I <strong>Lab</strong><br />
Downloading is very simple, you can download this Course here:<br />
http://wiseamerican.us/product/bis-<strong>311</strong>-devry-week-1-ilab/<br />
Or<br />
Contact us at:<br />
SUPPORT@WISEAMERICAN.US<br />
<strong>BIS</strong> <strong>311</strong> <strong>DeVry</strong> <strong>Week</strong> 1 i<strong>Lab</strong><br />
<strong>BIS</strong><strong>311</strong><br />
<strong>BIS</strong> <strong>311</strong> <strong>DeVry</strong> <strong>Week</strong> 1 i<strong>Lab</strong><br />
iLAB OVERVIEW<br />
Scenario/Summary<br />
In this i<strong>Lab</strong>, you will create a Visual Basic application that meets the following business requirements.<br />
Name Combiner Business Requirements<br />
The application will allow the user to input a person's first name and last name. When the user clicks the Display Name<br />
button, the application will combine the first name, a space, and the last name into the person's full name, and then<br />
display the full name to the user.<br />
The tasks, objects, events (TOE) chart for this application will be as follows.<br />
Task Object Event<br />
Get the following inputs from the user:<br />
First name<br />
Last name<br />
txtFirstName<br />
txtLastName<br />
Perform the following processing:<br />
Form full name by combining first name, a space, and last name btnDisplay Click<br />
Display the following output to the user:<br />
Full name<br />
lblFullName<br />
Deliverables<br />
Submit a single Word document named <strong>Lab</strong>1YourFirstLastName.docx (where YourFirstLastName = your first and last<br />
name; e.g., JohnSmith) containing the following.<br />
Screenshot of Windows form showing successful operation of the application<br />
Copy of the application's button-click event code<br />
Category Points % Description
Create form, rename it, and set its<br />
7 14%<br />
text property<br />
Add label and text box for first<br />
name, setting name, and text 7 14%<br />
properties for each<br />
Add label and text box for last<br />
name, setting name, and text 7 14%<br />
properties for each<br />
The form is named NameCombiner.vb and has text property set<br />
to <strong>Lab</strong>1 - Your Name where Your Name = your full name (e.g.,<br />
John Smith).<br />
The label text property is set to First name:. Text box is named<br />
txtFirstName and has text property set to nothing.<br />
The label text property is set to Last name:. The text box is<br />
named txtLastName and has text property set to nothing.<br />
Add labels for full name, setting<br />
name, and text properties for each 7 14% The first label text property is set to Full name:. The second label<br />
is named lblFullName and has text property set to ----------.<br />
Add command button and set its<br />
7 14%<br />
name and text properties<br />
Code button-click event 7 14%<br />
Program tested and runs as<br />
8 16%<br />
required<br />
The command button is named btnDisplay and has text property<br />
set to Display Name.<br />
The code in the button-click event declares two String variables<br />
for first, last, and full names; gets the values entered in the text<br />
boxes by the user into the corresponding variables; concatenates<br />
the first name, a space, and the last name, storing the result in<br />
the full name variable; and displays the full name in the<br />
appropriate label.<br />
A screenshot displays the form after the user has entered a first<br />
name and a last name and clicked the Display Name button. The<br />
corresponding first name, space, and last name are displayed in<br />
the output label.<br />
Total 50 100%<br />
Required Software<br />
Visual Studio 2012<br />
Access the software at.devry.edu">https://lab.devry.edu.<br />
Steps: all<br />
iLAB STEPS<br />
STEP 1: Launch and Configure Microsoft Visual Studio 2012<br />
.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/<strong>BIS</strong><strong>311</strong>_W1_i<strong>Lab</strong>.html#top">Back to Top<br />
(a) On the Citrix i<strong>Lab</strong> main screen, if the Visual Studio 2012 icon is not already displayed, click the plus sign (+) on the<br />
left side of the screen. Next, click on All Apps and scroll down to find Microsoft Visual Studio 2012. Click on it to add it<br />
to your Citrix i<strong>Lab</strong> menu screen.<br />
(b) On the Citrix i<strong>Lab</strong> main menu screen, click the Microsoft Visual Studio 2012 icon to launch the applicatio<br />
STEP 2: Create the Project<br />
.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/<strong>BIS</strong><strong>311</strong>_W1_i<strong>Lab</strong>.html#top">Back to Top<br />
(a) Pull down the File menu and select New Project.<br />
(b) In the New Project dialog box, ensure that the Visual Basic and Windows Form Application choices are selected.<br />
Change the name in the Name box at the bottom of the dialog box to NameCombiner. Click OK.<br />
(c) A blank form for your application should now be displayed as shown below.<br />
STEP 3: Set Up Main Form<br />
.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/<strong>BIS</strong><strong>311</strong>_W1_i<strong>Lab</strong>.html#top">Back to Top
(a) Under Solution Explorer on the right side, right-click on Form1.vb and select Rename. Change the name to<br />
NameCombiner.vb and press Enter. The result should look like the following.<br />
(b) If the Properties window is not already displayed below the Solution Explorer window at the bottom right of the<br />
screen, click the Wrench icon on the Solution Explorer toolbar to display it.<br />
(c) Click the blank form in the NameCombiner.vb [Design] tab on the left side of the screen to select it. The form's<br />
properties should now be displayed in the Properties window at the bottom right. Scroll through the list to find the Text<br />
property row. Change the property for the text from Form1 to <strong>Lab</strong>1 - Your Name where Your Name = your first and last<br />
names (e.g., John Smith).<br />
STEP 4: Add Form Controls<br />
.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/<strong>BIS</strong><strong>311</strong>_W1_i<strong>Lab</strong>.html#top">Back to Top<br />
(a) If the Toolbox pane is not opened on the left side of the screen, click the Toolbox tab at the center left edge of the<br />
screen to open it. Click the Pushpin symbol at the right side of the Toolbox title bar to pin the Toolbox in the open<br />
position.<br />
(b) Click the Common Controls heading in the Toolbox to expand it. Under Common Controls, select the <strong>Lab</strong>el control<br />
and drag it onto the form, positioning it in the upper left area. In the Properties window, select the Text property of the<br />
label and change it to First name:. Press Enter and you should see the new text appear in the label.<br />
(c) Drag a TextBox control from the Common Controls area of the Toolbox and position it directly underneath the First<br />
name: label. Note: You may have to scroll down in the list of controls to find the TextBox control. Next, in the Properties<br />
window, change the (Name) property to txtFirstName. Ensure that the Text property is empty (blank).<br />
(d) Drag another <strong>Lab</strong>el control from the Toolbox and position it in the upper right area of the form. Change its Text<br />
property to Last name:.<br />
(e) Drag another TextBox control from the Toolbox and position it directly underneath the Last name: label. Change its<br />
(Name) property to txtLastName and ensure that its Text property is empty (blank).<br />
(f) Drag another <strong>Lab</strong>el control from the Toolbox and position it in the center of the form below the text boxes. Change<br />
its Text property to Full name:.<br />
(g) Drag another <strong>Lab</strong>el control from the Toolbox and position it directly underneath the Full name: label. Change its<br />
(Name) property to lblFullName and its Text property to ---------- (10 dashes).<br />
(h) Drag a Button control from the Toolbox and position it in the center of the form near the bottom. Change its (Name)<br />
property to btnDisplay and its Text property to Display Name. If necessary, click and drag the sizing handles (small<br />
circles) at the edges of the button to make it larger so that the complete text can be seen in the button.<br />
(i) Verify that your form looks similar to the following, and make any necessary adjustments to the positions and<br />
properties of the controls.<br />
STEP 5: Code Button-Click Event<br />
.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/<strong>BIS</strong><strong>311</strong>_W1_i<strong>Lab</strong>.html#top">Back to Top<br />
(a) Double-click the Display Name button on the form. This will open the code editor with a stub or template for the<br />
button-click event handler procedure already generated for you by Visual Studio.<br />
(b) Starting where the cursor is positioned, in between the line beginning Private Sub btnDisplay_Click( . . . and the line<br />
End Sub, enter the following code.<br />
Code for Button-Click Event<br />
'Display full name<br />
Dim strFirstName As String<br />
Dim strLastName As String<br />
Dim strFullName As String<br />
strFirstName = txtFirstName.Text<br />
strLastName = txtLastName.Text
strFullName = strFirstName + " " + strLastName<br />
lblFullName.Text = strFullName<br />
After you have entered your code, the code editor window should look as follows.<br />
(c) Pull down the File menu and select Save All to save your changes to the project. If a Save Project dialog appears,<br />
ensure that the project is being saved to the My DocumentsVisual Studio 2012Projects folder under your DSI number.<br />
Click Save.<br />
STEP 6: Test, Debug, and Submit<br />
.equella.ecollege.com/file/8fe38950-b7ec-4492-8803-a1c7312a7eb1/67/<strong>BIS</strong><strong>311</strong>_W1_i<strong>Lab</strong>.html#top">Back to Top<br />
(a) Run the application by doing one of the following: click the Start button (green, right-pointing, triangle icon) on the<br />
toolbar; pull down the Debug menu and select Start Debugging; or press the F5 key.<br />
(b) Your form should appear. Enter your first name in the First name text box and your last name in the Last name text<br />
box. Then click the Display Name button. Your first and last name should appear under Full name with a space between<br />
them, as shown below.<br />
(c) If you received an error message or your application did not work correctly, don't despair; debugging is a natural<br />
part of the programming process. Review your code and the naming of your controls carefully, and find and correct the<br />
errors. Then try running the application again. If you get stuck, you can post in the Q & A Forum or contact your<br />
professor for assistance.<br />
(d) When your application runs and works correctly, capture a screenshot of the form with your first and last name<br />
entries and correct full name displayed. Note: To capture a screenshot of the current window, press the Ctrl, Alt, and<br />
PrintScreen keys simultaneously; this will copy an image of the current window into your copy-and-paste buffer. Next,<br />
open a Word document and paste your image into the document. Close the application form by clicking the X in the<br />
upper right corner. Now select and copy your Visual Basic code for the button-click event in the code editor, and paste<br />
this into the Word document as well. Save the Word document as <strong>Lab</strong>1YourFirstLastName.docx (where<br />
YourFirstLastName = your first and last name, e.g., JohnSmith) and submit it to the appropriate Dropbox.