2b – Labels and Pictures Lingma Acheson CSCI N331 VB .NET Programming Department of Computer and Information Science, IUPUI
Labels Every object on the has a type, a name, and some other properties associated with it. Type: Label Name: (must give it a name, invisible to the user) Other properties: Text on the label Size of the label Background color …
Labels Names must use the Hungarian notation or camel notation a convention that makes programs more understandable Format: xxxYyyy xxx - First three letters indicate the type of control, all lower case Yyyy – second part starts with an upper case letter, usually a word, indicates the purpose for this object E.g. lblGreet – a label for greeting the user txtIncome – a textbox for income btnReset – a reset button
Labels Can create multiple objects with the same type, but must have different names. E.g. create a form with two labels. Must single click on the object to define properties for an object.
Pictures Object type – PictureBox Camel Notation – picYyyyy Import an image Local resource → Import