SlideShare a Scribd company logo
Controls events
 Forms
 Form properties
 Controls
 Control properties
 Event Driven Programming
 Form Events
 Control Events
 Event Handlers
 VB Example Program
 A form is a container for controls
 A form is used to design a GUI-based window
in aWindows application
 A form displays information and receives
input from the user.
 Always orient a form at a task as defined by
the user
 Text – defines the text to display in the caption bar
 StartPosition – determines position of form when it
first appears (eg. CenterScreen)
 Size.Width, Size.Height – the 2D area occupied by
the form, in units of pixels
 Location.X, Location.Y – the relative position of the
form on the screen
 Visible – can be seen by the user
 Enabled – the user can interact with the form
 FormBorderStyle – determines the appearance and
behavior of the borders of the form
 Sizable: (Default) Has min, max, and close buttons; can be
resized by dragging edges
 Fixed 3D: Has a 3D look; min, max, and close buttons;
cannot be resized
 FixedSingle: Has single line border; min, max, and close
buttons; cannot be resized
 AcceptButton - designates which button on the
form is activated by the Enter Key
 Cancel Button - designates which button on the
form is activated by the ESC Key
 Visual objects that are placed on a form to enable
customized activities
 FamiliarVisual Basic controls:
 Label - displays text the user cannot change
 TextBox - allows the user to enter text
 Button – performs an action when clicked
 RadioButton - A round button that is selected or deselected with a mouse
 CheckBox – A box that is checked or unchecked with a mouse click
 Form - A window that contains these controls
 Built-in controls defined inWindows Form class library,
and are defined
 withToolBox and Form Designer
 or strictly with code
 Common properties shared by many controls
 Name,Text
 Size.Height &Width, Location.X &Y, Dock
 BackColor: Sets the background (fill) color
 ForeColor: Sets the foreground (text) color
 CanFocus, ContainsFocus, Focused
 Visible & Enabled determine availability to user
 Font properties affect text display in the control
▪ Font, size, bold, etc.
 Tab Index &Tab Stop
 DesignTime  Set in
PropertiesWindow
 RunTime  Set / Change in
Code
Slide 2- 9
 Specify the control name (btnExit)
 Then a dot
 Then the PropertyName (Visible)
 controlName.propertyName
 btnExit.Visible
▪ refers to theVisible property of the btnExit control
▪ The visible property values may only be true or false
 Item to receive the value (Left Side)
 Assignment Indicator =
 Value to be assigned(Right Side)
 VariableName =Value
 NumberVariable = 5
 ControlName.PropertyName = Setting
 btnExit.Visible = False
▪ Assigns the value False to theVisible property of the btnExit control
▪ Causes the text of the btnExit control to become hidden to the user
 txtFirstName.text = “Paul”
 txtLastName.text = “Overstreet”
 Properties
 Text
▪ &Cancel -> Cancel
▪ && -> &
 Events
 Click
 Use labels and link labels for text
display
 Text property (no more Caption) defines
text to display
 User cannot change a label
 LinkLabel enables hyperlinks
 Links.Add inserts a hyperlink into text
 Must write event-handler to invoke
browser
 See example
 Text box allows user to
enter or edit data
 Properties
 MaxLength, MultiLine
 AcceptsTab
 AcceptsReturn
 WordWrap
 ScrollBars
 Events
 TextChanged
 CheckState property
 Checked
 Unchecked
 Indeterminate (checked
but grayed)
 Text property displays
built-in caption
If chkMarried.CheckState = CheckState.Checked Then
M
End If
 ComboBox Properties
 Text
 DropDownStyle
▪ Simple
▪ Dropdown
▪ DropdownList
 Sorted
 Methods
 Items.Clear
 Items.Add
 Items.Remove
cboChoice.Items.Clear()
cboChoice.Items.Add("First")
cboChoice.Items.Add("Second")
cboChoice.Items.Add("Third")
cboChoice.Items.Add(TextBox1.Text)
cboChoice.Items.Remove("Third")
 Executes code after a
specified interval
 Timer Event
 Unique event that executes
after the interval specified in
the interval property expires
 Interval Property
 0 - 65,535 milliseconds
▪ 0 - means disabled
▪ 60,000 milliseconds is one
minute
 Enabled property must also
be true for timer to work.
 Timer control is never
visible at run time
 Stored in ComponentTray
at design time
 Applications recognize and respond to events by
executing code known as event procedures
 Event: An action that is recognized by an object.
 User Actions
▪ Mouse Click
▪ EnteringText
▪ Pressing a Key
 Program Calculations
 Triggered by the system
▪ Timer
 Event Handler: Code that is written by the
programmer to respond to an event
 Executes only when particular event occurs
 Common Form Events
 Form1_Load() - Occurs before a form is displayed
for the first time.
 Form1_Activated() - Occurs when form becomes
the active window - through code or by user
 Form1_Deactivate() - Occurs when the form loses
focus and is not the active form
 Form1_Closing() - Occurs when the form closes,
either through an event or the windows close
button being clicked
 Many controls share a Common set of events
to which they can react
 Click, DoubleClick
 MouseMove, MouseDown, MouseUp,
MouseWheel, MouseHover, MouseLeave
 KeyPress, KeyDown, KeyUp
 Resize
 DragDrop
 GotFocus
 LostFocus
 Focus is when an object becomes the “Active
Control”
 Focus Event Sequence:
 Enter
 GotFocus
 Leave
 Validating
 Validated
 LostFocus
 Create Event Procedure
 Double Click on Control
 Displays CodeWindow and Event Procedure Stub for
default event
Or
 Open the Code Editor (F7 orView Menu:Code Command)
 Select Control & Event from drop down windows in Code
Editor
Event Code Goes In Here
Exit Button – Clicked Method (btnExit_Click)
Private Sub btnExit_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnExit.Click
' End the application
End
End Sub
Line Continuation Mark
Name of the event the procedure responds to
Name of the control that owns the event procedure
Marks the beginning of this event procedure
Ends the program
Event handled by this procedure
 Input
 Controls
 Process
 Events
 Output
 Controls
UDIE – Implement the solution inVB:
 Create the Interface
 Input Controls
 Output Controls
 Set the Properties
 Configure the appearance and behavior of the
controls
 Write the Code to execute when events occur
 Process the inputs to create the outputs
 UsingVisual Basic.Net
create the following form
Object Property Setting
Form1 Text Demonstration
txtFirst Text (blank)
txtSecond Text (blank)
btnRed Text Change Color
to Red
When btnRed is clicked - Change txtFirst text color to red
 Double Click on btnRed
 Code window should appear
(with Event Procedure Stub)
 Add code to the event procedure stub:
txtFirst.ForeColor = Color.Red
When the text is edited in txtFirst - Change txtFirst text color to blue
 In CodeWindow
 Select the Control for the Event Procedure
 txtFirst from the ClassName box
 Select the Event from the Method Name Box
 TextChanged
 Add code to the event procedure stub:
 txtFirst.ForeColor = Color.Blue
When txtFirst is deselected - Change txtFirst text color to black
 In CodeWindow
 Select the Control for the Event Procedure
 txtFirst from the ClassName box
 Select the Event from the Method Name Box
 Leave
 Add code to the event procedure stub:
 txtFirst.ForeColor = Color.Black
 Click F5 or the Run Button
 Type “Hello” into the 1st textbox
 What Happens
 Click on the 2nd Textbox
 What happened in txtFirst and Why
 Click on the Button
 What happened in txtFirst
 Type “Friends” into the 1st textbox
 Stop Program by clicking Red X in corner
 Add a Button to your Form
 Name: btnExit
 Text Property: &Quit
 Add a Button Click Event for this Button
 Code: END
 Finds Syntax Errors (Errors in Programming Language)
 Return to btnRed Click Event Procedure
 Add this line of Code:
 txtSecond.text = Hello
Notice Wavy Blue Line –This indicates a Syntax Error that must be fixed.

More Related Content

PPT
VB.net
PallaviKadam
 
PPT
Introduction to java beans
Hitesh Parmar
 
PPT
Object Oriented Programming In .Net
Greg Sohl
 
PPTX
Event handling
swapnac12
 
PPT
Visual basic
umesh patil
 
PDF
Visual Basic 6.0
Anjan Mahanta
 
PPT
Visual Basic menu
kuldeep94
 
DOCX
Creating a data report in visual basic 6
mrgulshansharma
 
VB.net
PallaviKadam
 
Introduction to java beans
Hitesh Parmar
 
Object Oriented Programming In .Net
Greg Sohl
 
Event handling
swapnac12
 
Visual basic
umesh patil
 
Visual Basic 6.0
Anjan Mahanta
 
Visual Basic menu
kuldeep94
 
Creating a data report in visual basic 6
mrgulshansharma
 

What's hot (20)

PPTX
VB Function and procedure
pragya ratan
 
PPT
11 Database Concepts
Praveen M Jigajinni
 
PPTX
ER MODEL
Rupali Rana
 
PPTX
Windowforms controls c#
prabhu rajendran
 
PPTX
OOP concepts -in-Python programming language
SmritiSharma901052
 
PDF
Visual Basic IDE Introduction
Ahllen Javier
 
PPTX
Windows form application_in_vb(vb.net --3 year)
Ankit Gupta
 
PPT
android menus
Deepa Rani
 
PPT
The msg box function and the messagebox class
Faisal Aziz
 
PPTX
Data structure & its types
Rameesha Sadaqat
 
PPTX
4. listbox
chauhankapil
 
PPTX
Delegates and events in C#
Dr.Neeraj Kumar Pandey
 
PPTX
Operators used in vb.net
Jaya Kumari
 
PPS
Procedures functions structures in VB.Net
tjunicornfx
 
PPTX
Vectors in Java
Abhilash Nair
 
PPTX
Operators in java
AbhishekMondal42
 
PPTX
Functions in C
Kamal Acharya
 
PPT
Abstract data types
Poojith Chowdhary
 
PPTX
Integrity Constraints
madhav bansal
 
PPTX
Dialog box in vb6
Saroj Patel
 
VB Function and procedure
pragya ratan
 
11 Database Concepts
Praveen M Jigajinni
 
ER MODEL
Rupali Rana
 
Windowforms controls c#
prabhu rajendran
 
OOP concepts -in-Python programming language
SmritiSharma901052
 
Visual Basic IDE Introduction
Ahllen Javier
 
Windows form application_in_vb(vb.net --3 year)
Ankit Gupta
 
android menus
Deepa Rani
 
The msg box function and the messagebox class
Faisal Aziz
 
Data structure & its types
Rameesha Sadaqat
 
4. listbox
chauhankapil
 
Delegates and events in C#
Dr.Neeraj Kumar Pandey
 
Operators used in vb.net
Jaya Kumari
 
Procedures functions structures in VB.Net
tjunicornfx
 
Vectors in Java
Abhilash Nair
 
Operators in java
AbhishekMondal42
 
Functions in C
Kamal Acharya
 
Abstract data types
Poojith Chowdhary
 
Integrity Constraints
madhav bansal
 
Dialog box in vb6
Saroj Patel
 
Ad

Similar to Controls events (20)

PPT
4.7.14&17.7.14&23.6.15&10.9.15
Rajes Wari
 
PPSX
Unit2
Abha Damani
 
DOC
Practicalfileofvb workshop
dhi her
 
PPT
Visual studio.net
Dr. C.V. Suresh Babu
 
PPT
12 gui concepts 1
Jomel Penalba
 
PPT
4.C#
Raghu nath
 
PPTX
Controls
nicky_walters
 
PPT
Visual basic ppt for tutorials computer
simran153
 
PPTX
ch 3 of C# programming in advanced programming
ZahraWaheed9
 
PPT
visual programming GDI presentation powerpoint
ZahraWaheed9
 
PPT
Visual programming Chapter 3: GUI (Graphical User Interface)
ZahraWaheed9
 
PDF
BCA IPU VB.NET UNIT-III
Vaibhavj1234
 
PPTX
Commonly used controls and their Properties
Ephraim Quinones
 
PPT
Session 1. Bai 1 ve winform
mrtom16071980
 
PDF
Lab1
rksrks
 
PDF
VB PPT by ADI PART4.pdf
Prof. Dr. K. Adisesha
 
PDF
VB PPT by ADI PART4.pdf
AdiseshaK
 
PDF
Introduction to Visual Basic 6.0
DivyaR219113
 
PDF
Ppt on visual basics
younganand
 
PPTX
01 Database Management (re-uploaded)
bluejayjunior
 
4.7.14&17.7.14&23.6.15&10.9.15
Rajes Wari
 
Practicalfileofvb workshop
dhi her
 
Visual studio.net
Dr. C.V. Suresh Babu
 
12 gui concepts 1
Jomel Penalba
 
Controls
nicky_walters
 
Visual basic ppt for tutorials computer
simran153
 
ch 3 of C# programming in advanced programming
ZahraWaheed9
 
visual programming GDI presentation powerpoint
ZahraWaheed9
 
Visual programming Chapter 3: GUI (Graphical User Interface)
ZahraWaheed9
 
BCA IPU VB.NET UNIT-III
Vaibhavj1234
 
Commonly used controls and their Properties
Ephraim Quinones
 
Session 1. Bai 1 ve winform
mrtom16071980
 
Lab1
rksrks
 
VB PPT by ADI PART4.pdf
Prof. Dr. K. Adisesha
 
VB PPT by ADI PART4.pdf
AdiseshaK
 
Introduction to Visual Basic 6.0
DivyaR219113
 
Ppt on visual basics
younganand
 
01 Database Management (re-uploaded)
bluejayjunior
 
Ad

Recently uploaded (20)

PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
Basics and rules of probability with real-life uses
ravatkaran694
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
Virus sequence retrieval from NCBI database
yamunaK13
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 

Controls events

  • 2.  Forms  Form properties  Controls  Control properties  Event Driven Programming  Form Events  Control Events  Event Handlers  VB Example Program
  • 3.  A form is a container for controls  A form is used to design a GUI-based window in aWindows application  A form displays information and receives input from the user.  Always orient a form at a task as defined by the user
  • 4.  Text – defines the text to display in the caption bar  StartPosition – determines position of form when it first appears (eg. CenterScreen)  Size.Width, Size.Height – the 2D area occupied by the form, in units of pixels  Location.X, Location.Y – the relative position of the form on the screen  Visible – can be seen by the user  Enabled – the user can interact with the form
  • 5.  FormBorderStyle – determines the appearance and behavior of the borders of the form  Sizable: (Default) Has min, max, and close buttons; can be resized by dragging edges  Fixed 3D: Has a 3D look; min, max, and close buttons; cannot be resized  FixedSingle: Has single line border; min, max, and close buttons; cannot be resized  AcceptButton - designates which button on the form is activated by the Enter Key  Cancel Button - designates which button on the form is activated by the ESC Key
  • 6.  Visual objects that are placed on a form to enable customized activities  FamiliarVisual Basic controls:  Label - displays text the user cannot change  TextBox - allows the user to enter text  Button – performs an action when clicked  RadioButton - A round button that is selected or deselected with a mouse  CheckBox – A box that is checked or unchecked with a mouse click  Form - A window that contains these controls  Built-in controls defined inWindows Form class library, and are defined  withToolBox and Form Designer  or strictly with code
  • 7.  Common properties shared by many controls  Name,Text  Size.Height &Width, Location.X &Y, Dock  BackColor: Sets the background (fill) color  ForeColor: Sets the foreground (text) color  CanFocus, ContainsFocus, Focused  Visible & Enabled determine availability to user  Font properties affect text display in the control ▪ Font, size, bold, etc.  Tab Index &Tab Stop
  • 8.  DesignTime  Set in PropertiesWindow  RunTime  Set / Change in Code
  • 9. Slide 2- 9  Specify the control name (btnExit)  Then a dot  Then the PropertyName (Visible)  controlName.propertyName  btnExit.Visible ▪ refers to theVisible property of the btnExit control ▪ The visible property values may only be true or false
  • 10.  Item to receive the value (Left Side)  Assignment Indicator =  Value to be assigned(Right Side)  VariableName =Value  NumberVariable = 5  ControlName.PropertyName = Setting  btnExit.Visible = False ▪ Assigns the value False to theVisible property of the btnExit control ▪ Causes the text of the btnExit control to become hidden to the user  txtFirstName.text = “Paul”  txtLastName.text = “Overstreet”
  • 11.  Properties  Text ▪ &Cancel -> Cancel ▪ && -> &  Events  Click
  • 12.  Use labels and link labels for text display  Text property (no more Caption) defines text to display  User cannot change a label  LinkLabel enables hyperlinks  Links.Add inserts a hyperlink into text  Must write event-handler to invoke browser  See example
  • 13.  Text box allows user to enter or edit data  Properties  MaxLength, MultiLine  AcceptsTab  AcceptsReturn  WordWrap  ScrollBars  Events  TextChanged
  • 14.  CheckState property  Checked  Unchecked  Indeterminate (checked but grayed)  Text property displays built-in caption If chkMarried.CheckState = CheckState.Checked Then M End If
  • 15.  ComboBox Properties  Text  DropDownStyle ▪ Simple ▪ Dropdown ▪ DropdownList  Sorted  Methods  Items.Clear  Items.Add  Items.Remove cboChoice.Items.Clear() cboChoice.Items.Add("First") cboChoice.Items.Add("Second") cboChoice.Items.Add("Third") cboChoice.Items.Add(TextBox1.Text) cboChoice.Items.Remove("Third")
  • 16.  Executes code after a specified interval  Timer Event  Unique event that executes after the interval specified in the interval property expires  Interval Property  0 - 65,535 milliseconds ▪ 0 - means disabled ▪ 60,000 milliseconds is one minute  Enabled property must also be true for timer to work.  Timer control is never visible at run time  Stored in ComponentTray at design time
  • 17.  Applications recognize and respond to events by executing code known as event procedures  Event: An action that is recognized by an object.  User Actions ▪ Mouse Click ▪ EnteringText ▪ Pressing a Key  Program Calculations  Triggered by the system ▪ Timer  Event Handler: Code that is written by the programmer to respond to an event  Executes only when particular event occurs
  • 18.  Common Form Events  Form1_Load() - Occurs before a form is displayed for the first time.  Form1_Activated() - Occurs when form becomes the active window - through code or by user  Form1_Deactivate() - Occurs when the form loses focus and is not the active form  Form1_Closing() - Occurs when the form closes, either through an event or the windows close button being clicked
  • 19.  Many controls share a Common set of events to which they can react  Click, DoubleClick  MouseMove, MouseDown, MouseUp, MouseWheel, MouseHover, MouseLeave  KeyPress, KeyDown, KeyUp  Resize  DragDrop  GotFocus  LostFocus
  • 20.  Focus is when an object becomes the “Active Control”  Focus Event Sequence:  Enter  GotFocus  Leave  Validating  Validated  LostFocus
  • 21.  Create Event Procedure  Double Click on Control  Displays CodeWindow and Event Procedure Stub for default event Or  Open the Code Editor (F7 orView Menu:Code Command)  Select Control & Event from drop down windows in Code Editor Event Code Goes In Here
  • 22. Exit Button – Clicked Method (btnExit_Click) Private Sub btnExit_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnExit.Click ' End the application End End Sub Line Continuation Mark Name of the event the procedure responds to Name of the control that owns the event procedure Marks the beginning of this event procedure Ends the program Event handled by this procedure
  • 23.  Input  Controls  Process  Events  Output  Controls
  • 24. UDIE – Implement the solution inVB:  Create the Interface  Input Controls  Output Controls  Set the Properties  Configure the appearance and behavior of the controls  Write the Code to execute when events occur  Process the inputs to create the outputs
  • 25.  UsingVisual Basic.Net create the following form Object Property Setting Form1 Text Demonstration txtFirst Text (blank) txtSecond Text (blank) btnRed Text Change Color to Red
  • 26. When btnRed is clicked - Change txtFirst text color to red  Double Click on btnRed  Code window should appear (with Event Procedure Stub)  Add code to the event procedure stub: txtFirst.ForeColor = Color.Red
  • 27. When the text is edited in txtFirst - Change txtFirst text color to blue  In CodeWindow  Select the Control for the Event Procedure  txtFirst from the ClassName box  Select the Event from the Method Name Box  TextChanged
  • 28.  Add code to the event procedure stub:  txtFirst.ForeColor = Color.Blue
  • 29. When txtFirst is deselected - Change txtFirst text color to black  In CodeWindow  Select the Control for the Event Procedure  txtFirst from the ClassName box  Select the Event from the Method Name Box  Leave  Add code to the event procedure stub:  txtFirst.ForeColor = Color.Black
  • 30.  Click F5 or the Run Button  Type “Hello” into the 1st textbox  What Happens  Click on the 2nd Textbox  What happened in txtFirst and Why  Click on the Button  What happened in txtFirst  Type “Friends” into the 1st textbox  Stop Program by clicking Red X in corner
  • 31.  Add a Button to your Form  Name: btnExit  Text Property: &Quit  Add a Button Click Event for this Button  Code: END
  • 32.  Finds Syntax Errors (Errors in Programming Language)  Return to btnRed Click Event Procedure  Add this line of Code:  txtSecond.text = Hello Notice Wavy Blue Line –This indicates a Syntax Error that must be fixed.