Tutorial 01Instructor: Jim Davis Objectives Learn how to create a project. Learn what the project folder contents should look like. Learn how to include external resources in a project. Introduce the...

Promgramming assignment


Tutorial 01Instructor: Jim Davis Objectives Learn how to create a project. Learn what the project folder contents should look like. Learn how to include external resources in a project. Introduce the pictureBox control, its key properties: Name, image, sizeMode & visibility Introduce the Label control, its key properties: Name and Text Introduce the Button control, its key properties: Name and Text, key event: Click Learn that images used in a project must be stored in the project folder. Learn how to use buttons to create event procedures and let the user trigger actions. Instructions Be sure you have installed Visual Studio on your computer. Start Visual Basic 2019 Express. From the File Menu, select New Project. In the New Project dialog box, make sure you are creating a Windows Form App and have selected Visual Basic as the programming Language. Give the project a name in the Name text box (e.g. call it Wizard Program) then click OK. Note: Detailed instructions for a similar program are in Chapter 1 of your Textbook. From the File menu select Save All to actually save your project to your hard drive. Note when you run your program the VB editor automatically saves your project. Open your Project folder. You will see another folder which has the same name as your project folder. I will refer to the outside folder as the Project folder and the inside folder as the Project Resources folder. Create a new folder inside the Project Resources folder and name it Resources. Copy the file “Wizard_appears.gif” from AcadShare1\Labs\CompSci\Resources\1615\Programs\Week 1\\T01 Wizard to your local drive and paste it inside the Resources folder you just created. See illustration below. Select the form and change the Text property to Wizard Program. In the code part of the form click in front of the words: Public Sub Class Form1. Press enter 3 times. Go up to the first blank line and enter the Program Documentation. See Handouts. Add a Picture control. Place it in the middle of the window. Set the Name property to either picWizard or wizardPicture. Set the Image property to Wizard_appears.gif – make it a Project Resource File! Set the SizeMode property to StretchImage Set the Visibility property to False Below the Picture control add a Label. In the Text property enter: TheWizard, in the TextAlign property select Middle, Middle, set AutoSize property to False and Visibility to False. In your newly created project add three buttons to your form. Set the properties as follows: Control Location Text Property Name Property Button 1 Lower right Exit btnExit or exitButton Button 2 Lower left Show btnShow or showButton Button 3 Lower middle Hide bthHide or hideButton Program each of the three buttons. The command to end the program is Me.Close We cause the image to appear and disappear by setting visibility to True or False This is done using an assignment statement (see notes) To make it appear enter: picWizard.visible = True To make it disappear enter: picWizard.visible = False To make the text “Wizard Appears” appear enter: lblWizard.Text = “Wizard Appears” To make the text “Wizard Hidden” appear disappear: lblWizard.Text = “Wizard Hidden” Documentation – You added the Program Documentation in step 7 above. In each Sub after its declaration add a comment stating what the Sub does. When you have finished you should submit your work. To do this select: Save All, then: close the VB program entirely Rename the outermost folder of your solution (the Project folder identified in the diagram below) to T01 LastName FirstName (including the spaces as indicated) and upload this folder to Academic Files\AcadShare1\Labs\CompSci\Submit\1615\001. If you do not finish this tutorial in class, finish it on your own as soon as possible and submit it as described in 13b above. Project folder Folder Resources folder Folder
Feb 09, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here