Lesson 3 identify parts of the visual basic work screen

Click here to load reader

download Lesson 3   identify parts of the visual basic work screen

of 20

  • date post

    13-Jan-2017
  • Category

    Education

  • view

    861
  • download

    0

Embed Size (px)

Transcript of Lesson 3 identify parts of the visual basic work screen

  • Identify Parts of the Visual Basic Work Screen7. 6.3.1.5.2.4.

  • 1. 2. 3. 4. 5. 8. 7. 6. Identify Parts of the Visual Basic Work Screen

  • Wordpool: Choose the answer on the list providedAlso known as radio button that allows the user to choose one among the given options.Not a control but used to select controls to be put on a form.A control that initiates an action when pressed or clicked.Control that accept an input value to user.A control that is used to display images.Control that provides user with a choice.Control used to display text or caption.A prefix used for Form.A control that provides list of items.This control is used to hold controls in groups.FrameCommandButtonOptionButtonPointerPictureBoxLabel TextBoxCheckBoxforfrmComboBoxHScrollBar

  • Create the names of the different control ControlPreferred NameSave CommandButtonName TextBoxGender OptionButonAge CheckBoxGirlpicture PictureBoxCompany LabelExit CommandButtonDepartment Textbox

  • Title BarMenu BarStandard BarToolboxDesigner WindowProperties WindowSolution ExplorerWindowError/Task List Window

  • Wordpool: Choose the answer on the list providedAlso known as radio button that allows the user to choose one among the given options.Not a control but used to select controls to be put on a form.A control that initiates an action when pressed or clicked.Control that accept an input value to user.A control that is used to display images.Control that provides user with a choice.Control used to display text or caption.A prefix used for Form.A control that provides list of items.This control is used to hold controls in groups.OptionButtonPointerCommandButtonTextBoxPictureBoxCheckBoxLabel frmComboBoxFrameImagebox

  • Create the names of the different control ControlPreferred NameSave CommandButtoncmdsaveName TextBoxtxtnameGender OptionButonoptgenderAge CheckBoxchkageGirlpicture PictureBoxpicgirlpictureCompany LabellblcompanyExit CommandButtoncmdexitDepartment Textboxtxtdepartment

  • Events and Event ProceduresEvents is the users action; it could be clicking, double clicking or pressing a key on a keyboard.

    Code is the statement that carries out the action when the event is triggered.

    Event Procedure Adding a code in an event

  • Common Control Event

    EventDescriChangeptionActivateThis event occurs when forms get a focusClickThis event occurs when the user click anywhere on the form or control.InitializeThis event occurs when the form is first generated.LoadThis event occurs when the form is loaded into the computers memory and displays on the screenDblclickThis event occurs when the user double-clicks the form or controlDeactivateThis even occurs when another form gets the focusUnloadThis event occurs when the form is terminated from the computers memory.ResizeThis event occurs when the user changes the size of a formChangeThis occurs when the user changes the test inside a textbox

  • The Code WindowProcedure is a section in the code window that holds assignment statements for a control to perform a specific task or action.

  • Object BoxProcedure Box The word Private indicates that the procedure is solely for the selected object and form. It cannot be called up by other forms.

  • Object BoxProcedure Box The word Sub on the first line indicates the beginning of the event procedure.

  • Object BoxProcedure BoxThe cmddisplay indicates the control that will do the event.

  • Object BoxProcedure BoxThe Click indicates the event that should occur to the object or control.

  • Object BoxProcedure BoxThe End Sub or the last line indicates the termination of the event procedure.

  • Object BoxProcedure BoxAdding Code or Procedure to an Event1. Double click on the control that you will insert a code. (or you may use the code window button on the project explorer.)

  • Object BoxProcedure BoxAdding Code or Procedure to an Event2. On the code window the cursor is already set in between the private sub and end sub. The action that you want to occur in response to an event are known as assignment statements.

  • Object BoxProcedure BoxAdding Code or Procedure to an EventThis can be expressed as:

    Objectname.property = setting or property value

    *This means assigning values to properties of an object.

  • Object BoxProcedure BoxAdding Code or Procedure to an EventThis can be expressed as:

    Objectname.property = setting or property value

    *This means assigning values to properties of an object.

  • Object BoxProcedure BoxAdding Code or Procedure to an Event3. After inserting your event procedure, go to toolbar and then try running your program by clicking the Start debugging button. (If there is a program error, program will not run successfully.