SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt? (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)
 

Kürzlich hochgeladen

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

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