SlideShare une entreprise Scribd logo
1  sur  14
 Controls and their Codes
 Variables and Constants
 Operators and Functions
 Conditional Statements
› If-Then
› If-Then-Else
› Nested Ifs
› Select Case
 Procedure – declarations that are
performed when you do an action to an
object
 Design Time
 Run Time
 Events –
 Methods -
 Caption – sets the text on the title bar
 Back Color – background color
 Control Box
› True: Makes the Control Menu visible
› False: Hides the Control Menu
 BorderStyle
› 0 – None: Can’t be resized, No Title Bar
› 1- Fixed Single: Border can’t be resized at
runtime, Title Bar only has the close button,
cannot be moved
› 2 – Sizable: Default Setting, Border can be
resized and Title Bar has Minimize, Maximize
and Close Buttons
 Load – performed as the form is being
loaded
› Can be accessed by double-clicking an
empty space on the form
Sample Code:
Private Sub Form_Load
Form1.BackColor = vbBlue
End Sub
 Caption – sets the text on the button
 Default – determines which is the default
command button on the form
› True: Button is activated when Enter is pressed
 Cancel – indicates whether a button is
the cancel button in a form
› True: Button is activated when ESC is pressed
*Note: You can only have one Default and
Cancel button on a Form
 Style – sets the appearance of a control
› 0 – Standard : Text-Only
› 1 – Graphical : Can contain a Picture or
Colored Background
 Enabled – sets whether a control can
interact with an event
› Can be True or False
 Visible – Hides or shows a button
› Can be True or False
 Click - performs an action when the
control is clicked
Syntax:
Private Sub Command1_Click ()
Statements
End Sub
 Alignment - Sets the alignment
› 0-Left Justify: Align Left
› 1-Right Justify: Align Right
› 2-Center: Align Center
 Auto Size – automatically resizes the
label to fit the contents
› Can be True or False
 Back Style – indicates whether the
background is transparent or opaque
 Text – displays text on the text box
 Max Length – limits the number of
characters to be entered by the user
 Password Char – Sets the character that
would mask the characters entered by
the user
 Locked – sets whether the user can edit
the text on a control
› True: User can’t edit the text
› False: User can edit the text
 Tab Index – sets the order in which
controls get the focus
› Starts at zero

Contenu connexe

Tendances

Intro to Inventor with MugTree
Intro to Inventor with MugTreeIntro to Inventor with MugTree
Intro to Inventor with MugTreekrysia
 
Assembling the MugTree (Using Inventor10)
Assembling the MugTree (Using Inventor10)Assembling the MugTree (Using Inventor10)
Assembling the MugTree (Using Inventor10)krysia
 
Paths, Masks And Blend Modes
Paths, Masks And Blend ModesPaths, Masks And Blend Modes
Paths, Masks And Blend ModesShan
 
Character walkcycle in Maya (Basic)
Character walkcycle in Maya (Basic)Character walkcycle in Maya (Basic)
Character walkcycle in Maya (Basic)Avinash Ravindran
 

Tendances (6)

Homeworkk
HomeworkkHomeworkk
Homeworkk
 
Intro to Inventor with MugTree
Intro to Inventor with MugTreeIntro to Inventor with MugTree
Intro to Inventor with MugTree
 
Thousand doors
Thousand doorsThousand doors
Thousand doors
 
Assembling the MugTree (Using Inventor10)
Assembling the MugTree (Using Inventor10)Assembling the MugTree (Using Inventor10)
Assembling the MugTree (Using Inventor10)
 
Paths, Masks And Blend Modes
Paths, Masks And Blend ModesPaths, Masks And Blend Modes
Paths, Masks And Blend Modes
 
Character walkcycle in Maya (Basic)
Character walkcycle in Maya (Basic)Character walkcycle in Maya (Basic)
Character walkcycle in Maya (Basic)
 

Dernier

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 

Dernier (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 

Commonly used controls and their Properties

  • 1.
  • 2.  Controls and their Codes  Variables and Constants  Operators and Functions  Conditional Statements › If-Then › If-Then-Else › Nested Ifs › Select Case
  • 3.  Procedure – declarations that are performed when you do an action to an object  Design Time  Run Time  Events –  Methods -
  • 4.  Caption – sets the text on the title bar  Back Color – background color  Control Box › True: Makes the Control Menu visible › False: Hides the Control Menu
  • 5.  BorderStyle › 0 – None: Can’t be resized, No Title Bar › 1- Fixed Single: Border can’t be resized at runtime, Title Bar only has the close button, cannot be moved › 2 – Sizable: Default Setting, Border can be resized and Title Bar has Minimize, Maximize and Close Buttons
  • 6.
  • 7.  Load – performed as the form is being loaded › Can be accessed by double-clicking an empty space on the form Sample Code: Private Sub Form_Load Form1.BackColor = vbBlue End Sub
  • 8.
  • 9.  Caption – sets the text on the button  Default – determines which is the default command button on the form › True: Button is activated when Enter is pressed  Cancel – indicates whether a button is the cancel button in a form › True: Button is activated when ESC is pressed *Note: You can only have one Default and Cancel button on a Form
  • 10.  Style – sets the appearance of a control › 0 – Standard : Text-Only › 1 – Graphical : Can contain a Picture or Colored Background  Enabled – sets whether a control can interact with an event › Can be True or False  Visible – Hides or shows a button › Can be True or False
  • 11.  Click - performs an action when the control is clicked Syntax: Private Sub Command1_Click () Statements End Sub
  • 12.  Alignment - Sets the alignment › 0-Left Justify: Align Left › 1-Right Justify: Align Right › 2-Center: Align Center  Auto Size – automatically resizes the label to fit the contents › Can be True or False  Back Style – indicates whether the background is transparent or opaque
  • 13.  Text – displays text on the text box  Max Length – limits the number of characters to be entered by the user  Password Char – Sets the character that would mask the characters entered by the user
  • 14.  Locked – sets whether the user can edit the text on a control › True: User can’t edit the text › False: User can edit the text  Tab Index – sets the order in which controls get the focus › Starts at zero