60 likes | 70 Views
Understand Object Naming ( 4.02). Computer Programming 1. Objective/Essential Standard. Essential Standard : 4.00 Understand Variables and Naming Conventions Indicator 4.01Understand Variables and Data Types (5%) Indicator 4.02 Understand Object Naming (3%). Naming Objects.
E N D
Understand Object Naming (4.02) Computer Programming 1
Objective/Essential Standard • Essential Standard: 4.00 Understand Variables and Naming Conventions • Indicator 4.01Understand Variables and Data Types (5%) • Indicator 4.02 Understand Object Naming (3%)
Naming Objects • In the last unit we learned about naming variables. Let’s focus on objects now. • What is an object? • Objects represent “real” things • Dog, Chair… • Label, Button • Objects have properties and behaviors (methods) • Button • Properites: Name, Text … • Behaviors/Methods: Click . . .
Naming Objects • Common object names are listed below with examples in (): • Form - frm (frmMain) • Button - btn (btnSubmit) • Label - lbl (lblTotal) • Text Box - txt (txtAge) • Radio Button- rad (radAdd) • Check box - chk (chkDivide) • Image - img (imgMegaMan) • Combo Box - cbo (cboState) • Picture Box - pic (picFlower) • List box - lst (lstState) • Menu - mnu (mnuFile)
Keyword “Me” used on Forms Ex: Me.Close Preceeding a form name with “Me” refers to the current form (The active one). Using Me is optional in VB 2010 and 2015 in most cases when using only one form. When using multiple forms, opening and closing forms must use the Me.Hide or Me.Show. Computer Programming I- Summer 2011
Vocabulary Object Naming Conventions for our objects