1 / 15

BBT 10

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

nodin
Download Presentation

BBT 10

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BBT 10 Visual Basic01 and 02

  2. 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

  3. Assignment 1 • Open Microsoft Visual Basic • Start • Type “visual” in search box • Select Microsoft Visual Basic 2010 Express

  4. Open Visual Basic 2010 Express • Select New Project, Windows Form Application, OK

  5. 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

  6. Open the Toolbox • Select the Toolbox to the right and dock • Create the form below with • A Label and • Two Buttons

  7. Label1 • Select Label1 • Click on the title bar of the Properties window to make it the active window • Change the (Name) to lblMessage

  8. Button1 • Select the Button1 button • Change the Name property to cmdPush • Change the Text property to Push Me

  9. Button2 • Select the Button2 button • Change the Name property to cmdExit • Change the Text property to Exit

  10. Form • Click anywhere on the form • Change the text to Hello World by Your Name

  11. 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”

  12. 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

  13. Save Assignment and Run Program • Save Visual Basic 01 assignment • Select Start Debugging

  14. Naming Rules and Conventions for Objects

  15. 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.

More Related