Setting Properties of Objects

Slides:



Advertisements
Similar presentations
Introducing More Controls Text boxCheck box Option button Command button frame image.
Advertisements

Compunet Corporation Programming with Visual Studio.NET GUI Week 13 Tariq Aziz and Kevin Jones.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 7- 1.
Chapter Creating Applications With Visual Basic 2.
Adding Controls to User Forms. Adding Controls A user form isn’t much use without some controls We’re going to add controls and write code for them Note.
Slide 1 Chapter 2 Visual Basic Interface. Slide 2 Chapter 2 Windows GUI  A GUI is a graphical user interface.  The interface is what appears on the.
© 2006 ITT Educational Services Inc. Introduction to Computer Programming: Unit 1: Chapter 2: Slide 1 Unit 1 Introduction to Programming Using VB.NET Chapter.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
Visual Basic Chapter 1 Mr. Wangler.
Multiple Forms, Standard Modules, And Menus
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Menus,MonthCalender, DateTimePicker, MDI,Tree View, List View,
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
Menus,MonthCalender, DateTimePicker, MDI,Tree View, List View,
CSCI Chapter 2 Creating Application with Visual Basic Instructor: Bindra Shrestha University of Houston – Clear Lake.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Chapter 3 – Fundamentals of Programming in VB.NET VB.NET Controls VB.NET Events Numbers Strings Input and Output.
Starting Out with Visual Basic.NET 2 nd Edition Chapter 2 Creating Applications With Visual Basic.NET.
Basic Controls & Properties Chapter 2. Overview u VB-IDE u Basic Controls  Command Button  Label  Text Box  Picture Box u Program Editor  Setting.
Copyright © 2001 by Wiley. All rights reserved. Chapter 2: Using Visual Basic to Create a First Project Getting Started with VB Development Environment.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Microsoft Visual Basic 2010 CHAPTER THREE Program Design and Coding.
Visual Basic.NET BASICS Lesson 3 Events and Code.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Visual Basic.net Textbox & Label Controls. Textbox Naming convention (txt) Primary use (user input) Can except numeric and character values.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Chapter Two Creating a First Project in Visual Basic.
Chapter 2 - VB 2008 by Schneider1 Chapter 2 –Visual Basic, Controls, and Events 2.1 An Introduction to Visual Basic 2.2 Visual Basic Controls 2.3 Visual.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
What is Visual Basic.NET? 110 B-1 e.g. a word processor doesn’t do anything until the user clicks on a button, types text... A programming language that.
3.2 VB.NET Events An Event Procedure Properties and Event Procedures of the Form Tab Order of Controls Exercises.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
1 Advanced Computer Programming Lab Calculator Project.
Chapter 3 - VB.NET by Schneider1 Chapter 3 – Fundamentals of Programming in VB.NET Part I VB.NET Controls VB.NET Events.
COMPUTER PROGRAMMING I 3.02 Apply Properties Associated with the Controls.
Microsoft Visual Basic 2005 BASICS Lesson 3 Events and Code.
1 Introduction to Visual Basic Dr Mohd Nabil Almunawar MS 3403 Advanced Computing.
1 CS 106 Computing Fundamentals II Chapter 210 “Adding Controls to User Forms” Herbert G. Mayer, PSU CS Status 7/4/2013 Initial content copied verbatim.
Creating Menus Menu Bar – behaves like standard Windows menus Can be used in place of or in addition to buttons to execute a procedure Menu items are controls.
Chapter 1 Introduction to Visual Basic.NET Programming In Visual Basic.NET © 2001 by The McGraw-Hill Companies, Inc. All rights reserved.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
Sorry, the pen lost control. Anyway, you need to download both the.vbp and the.frm for each project. I looked at PrCalc, I did not look at inventory.
Introduction to VB programming Dr. John P. Abraham UTPA Chapters 2 & 3.
Visual Basic A Quick Tutorial VB Review for ACS 367.
Addison Wesley is an imprint of © 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 3 Variables and Calculations.
Programming with Visual Basic.NET. Quick Links Program Code The Code Window The Event Procedure Assignment Statements Using AutoList Radio Buttons Buttons.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Chapter 7, Slide 1Starting Out with Visual Basic 3 rd Edition Chapter 7 Multiple Forms, Standard Modules, And Menus.
Chapter 4: Do-It-Yourself Designing (Designing Interfaces)
UNIT 1 Lesson 1 Introduction.
Visual Basic.NET Windows Programming
Apply Procedures to Develop Menus, List Box and Combo Box Objects
Chapter 1: An Introduction to Visual Basic 2015
1. Introduction to Visual Basic
How to design a Windows Forms application
Apply Procedures to Develop Menus, List Box and Combo Box Objects
Chapter 3 Fundamentals of Programming in Visual Basic 3
Introduction to VB programming
Chapter 2 Visual Basic Interface
Creating and executing a program
Windows Forms GUI: A Deeper Look
1.الدوال Function 2.الاجراءاتSub Procedure 3.وحده نمطيه Add Module
Hello World in Visual Basic
Building an Application in the Visual Basic .NET Environment
Project Design, Forms and Buttons
Understanding the Integrated Development Environment
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
GUI Programming in Visual Studio .NET
Custom Forms with VBA in Excel In-Class Exercise #11
Presentation transcript:

Setting Properties of Objects Lecture 4

Ways of setting properties There are basically two ways of setting properties for objects. Properties can be set at Design Time or Setting Properties at Run Time

Setting Properties of Objects at Design Time Each form and control has properties assigned to it by default when you start up a new project. Question: How do we set Property at Design Time?

Setting Properties at Run Time You can also set or modify properties while your application is running. To do this, you must write some code. The code format is: ObjectName.Property = NewValue

Run time properties Such a format is referred to as dot notation. For example, to change the BackColor property of a form name frmStart, we'd type: frmStart.BackColor = BLUE

Naming Objects There are rules in maning objects in Visual Basic What are the Rules?

Naming Convention A convention has been established for naming Visual Basic objects. This convention is to use a three letter prefix (depending on the object) followed by aname you assign. A few of the prefixes are shown (we’ll see more as we progress in the class)

Example Object Prefix Example Form frm frm Watch Command Button cmd, btn cmdExit, btnStart Label lbl lblStart, lblEnd Text Box txt txtTime, txtName Menu mnu mnuExit,mnuSave Check box chk chkChoice

How Names are Used in Object Events The names you assign to objects are used by Visual Basic to set up a framework of event- driven procedures for you to add code to Private Sub n1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles n1.Click End Sub What is the Object Name????

Creating Access Key Access Key is created to allow operation of object names without the mouse The ampersand (&) is used in creating the Access key The ampersand precedes a button's access key The access key is pressed in conjunction with the Alt key. The access keys appear with an underscore (_).

Example &End Timing = Alt+E E&xit = Alt+X &Start Timing = Alt+S