150 likes | 315 Views
BBT 10. Visual Basic 01 and 02. Tip. Before creating any files for your project, first create a new folder Save all of your files in the folder Pieces of the project will not be lost when coping or moving the entire folder. Assignment 1. Open Microsoft Visual Basic Start
E N D
BBT 10 Visual Basic01 and 02
Tip • Before creating any files for your project, first create a new folder • Save all of your files in the folder • Pieces of the project will not be lost when coping or moving the entire folder
Assignment 1 • Open Microsoft Visual Basic • Start • Type “visual” in search box • Select Microsoft Visual Basic 2010 Express
Open Visual Basic 2010 Express • Select New Project, Windows Form Application, OK
Save Visual Basic 01Assignment • Select File, Save All • Name the project Visual Basic 01 • Select the Browse button and save your assignment in the Visual Basic folder on your U: drive • Select Save
Open the Toolbox • Select the Toolbox to the right and dock • Create the form below with • A Label and • Two Buttons
Label1 • Select Label1 • Click on the title bar of the Properties window to make it the active window • Change the (Name) to lblMessage
Button1 • Select the Button1 button • Change the Name property to cmdPush • Change the Text property to Push Me
Button2 • Select the Button2 button • Change the Name property to cmdExit • Change the Text property to Exit
Form • Click anywhere on the form • Change the text to Hello World by Your Name
Code the Push Me Button • Double click the Push Me button • Press the Tab key once to indent and then type ‘Display the Hello World message • Press Enter and notice the remarks turn green • Press Enter and type lblMessage.Text = “Hello World”
Code the Exit Button • Double click the Exit button • Press the Tab key once and type ‘Exit the project • Press Enter twice and type End
Save Assignment and Run Program • Save Visual Basic 01 assignment • Select Start Debugging
Visual Basic 02 • Write a new Visual Basic project that displays a different greeting, or make it display the name of your school. • Include at least three command buttons to display the greeting and exit the project. • Include a label that holds your name at the bottom of the form and change the Text property of the form to something meaningful. • Follow good naming conventions for object names; include remarks at the top of every procedure and in the General Declarations section of the module. • Select a different font name, font size and color for the greeting label. Select each font attribute from the Font dialog box from the Properties window.