SlideShare a Scribd company logo
Presentation
On
Topic: Timer, ComboBox,
Rich TextBox, Slider
 Timer Contol
 Combobox
 Rich Textbox
 Slider




Contents
 Timer Control Works like a stopwatch or alarm clock
 Timer control counts repeatedly as long as enabled
  property is set to true
 Interval: It specifies the interval between Timer events in
  milliseconds




Timer Control
Timer Control Application
   Dim counter As Integer
   Private Sub cmdend_Click()
   Timer1.Enabled = False
   End Sub

 Private Sub cmdstart_Click()
 Timer1.Enabled = True
 End Sub

   Private Sub Timer1_Timer()
   counter = counter + 1
   If counter = 95 Then
   counter = 1
   End If
   If counter = 1 Then
   Shape1.FillColor = vbRed
   Shape2.FillColor = vbWhite
   Shape3.FillColor = vbWhite
   End If


Coding
 If counter = 45 Then
 Shape1.FillColor = vbWhite
 Shape2.FillColor = vbYellow
 Shape3.FillColor = vbWhite
 End If
 If counter = 50 Then
 Shape1.FillColor = vbWhite
 Shape2.FillColor = vbWhite
 Shape3.FillColor = vbGreen
 End If
 End Sub
Output
 Features of Text box and List box
 It is used to present list to the User
 This control allow the user to select an item either by
  typing into the Combo box, or by selecting it from the list
 It contains an edit field




Combo Box Control
 Three Styles Combo Box
   The drop down combo Box
   The Simple combo Box
   The drop down list




Combo Box Styles
Drop down Combo Box
Style 0




Simple Combo Box
Style 1




 Drop Down List Box
 Style 2
Form Design
 Coding
     Dim a, b
     Private Sub cmdshowdate_Click()
     lblcombo.Caption = Combo2.Text + " " + Combo3.Text + "," + Combo4.Text
     End Sub

     Private Sub Combo1_click()
     If Combo1.ListIndex = 0 Then
     lblcombo.ForeColor = vbRed
     End If
     If Combo1.ListIndex = 1 Then
     lblcombo.ForeColor = vbGreen
     End If
     If Combo1.ListIndex = 2 Then
     lblcombo.ForeColor = vbBlue
     End If
     End Sub



  Combo Box Application
   Private Sub Form_Load()
   Combo1.AddItem "Red"
   Combo1.AddItem "Green"
   Combo1.AddItem "Blue"
   a=0
   Do While a < 31
   a=a+1
   Combo3.AddItem a
   Loop

   b = 1900
   Do While b < 2012
   b=b+1
   Combo4.AddItem b
   Loop


Conti…
 Combo2.AddItem "Jan"
 Combo2.AddItem "Feb"
 Combo2.AddItem "March"
 Combo2.AddItem "April"
 Combo2.AddItem "May"
 Combo2.AddItem "June"
 Combo2.AddItem "july"
 Combo2.AddItem "August"
 Combo2.AddItem "September"
 Combo2.AddItem "October"
 Combo2.AddItem "November"
 Combo2.AddItem "December"
 End Sub


Conti…
Output
 The Rich Text Box Control allows the user to enter and
  edit text while also providing more advanced formatting
  features than the conventional TextBox control.
 Syntax:
            RichTextBox




Rich Text Box
How to Open Rich Text Box
Form Design
 Private Sub cmdrtbbox_Click()
 rtb1.Text = "The rich text box support underlines, Bold
  and Italic text."
 rtb1.SelStart = rtb1.Find("underlines")
 rtb1.Span ("underlines")
 rtb1.SelUnderline = True

 rtb1.SelStart = 0
 rtb1.SelStart = rtb1.Find("Bold")
 rtb1.Span ("Bold")
 rtb1.SelBold = True


Conti…
 rtb1.SelStart = 0
 rtb1.SelStart = rtb1.Find("Italic")
 rtb1.Span ("Italic")
 rtb1.SelItalic = True
 rtb1.SelStart = 0
 rtb1.SelStart = rtb1.Find("underlines")
 rtb1.Span ("underlines")
 rtb1.SelFontName = "Arial"
 rtb1.SelFontSize = 18
 End Sub


Conti…
Output
 To Set the value of a point on a graph
 To select the range of number to be passed into the array
 To resize a form, field or other graphic object




Slider Control
How to open a slider
 Value
 Min, Max
 Tickfrequency
 Tickstyle
 Smallchange
 Largespace
 Select range
 Selstart
 Sellength




Operations using Slider
Richtextbox
Richtextbox
 ccOrientationhorizontal (value 0, the default)
   Orients the slider horizontally

 ccOrientationvertical (value1)
   Orients the slider vertically

   Slider1.orientation=ccorientationvertical



Selecting a Slider’s
Orientation
 Slider1.Max=90
 Slider1.Min=50




Setting a Slider’s Range
 Private Sub Form_Load()
 Slider1.Max = 250
 Slider1.Min = 0
 Slider1.LargeChange = 5
 Slider1.TickFrequency = 25
 End Sub

 Private Sub Slider1_Change()
 txt1.Text = "slider position" & Str(Slider1.Value)
 End Sub



Handling Slider Events
Conti…
 Private Sub Form_Load()
 Slider1.Max = 100
 Slider1.Min = 0
 Slider1.LargeChange = 5
 Slider1.TickFrequency = 10
 Slider1.TickStyle = sldNoTicks
 End Sub
THANKS

More Related Content

PPTX
Polygon filling algorithm
Aparna Joshi
 
PPTX
MACRO PROCESSOR
Bhavik Vashi
 
PPT
Top down parsing
ASHOK KUMAR REDDY
 
PPTX
Context free grammar
Mohammad Ilyas Malik
 
PPTX
Macro Processor
Saranya1702
 
PPTX
Computer Graphics - clipping
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
PPTX
Output primitives in Computer Graphics
Kamal Acharya
 
PPTX
Asp objects
RajaRajeswari22
 
Polygon filling algorithm
Aparna Joshi
 
MACRO PROCESSOR
Bhavik Vashi
 
Top down parsing
ASHOK KUMAR REDDY
 
Context free grammar
Mohammad Ilyas Malik
 
Macro Processor
Saranya1702
 
Output primitives in Computer Graphics
Kamal Acharya
 
Asp objects
RajaRajeswari22
 

What's hot (20)

PPTX
Lexical analysis - Compiler Design
Muhammed Afsal Villan
 
PPTX
Ai quantifiers
Tayyaba Jabeen
 
PDF
Compiler Design Lecture Notes
FellowBuddy.com
 
PPT
Lecture 3,4
shah zeb
 
PPT
Line drawing algo.
Mohd Arif
 
PPT
Compiler Design
Mir Majid
 
PPTX
Raster scan system & random scan system
shalinikarunakaran1
 
DOCX
Techniques & applications of Compiler
Preethi AKNR
 
PPT
BackTracking Algorithm: Technique and Examples
Fahim Ferdous
 
PPTX
4. listbox
chauhankapil
 
PPTX
Specification-of-tokens
Dattatray Gandhmal
 
PPTX
Theory of automata and formal language
Rabia Khalid
 
PPT
C++ oop
Sunil OS
 
PPT
Type Checking(Compiler Design) #ShareThisIfYouLike
United International University
 
PPTX
7-NFA to Minimized DFA.pptx
SLekshmiNair
 
PPTX
Attributes of Output Primitives
Renita Santhmayora
 
PPTX
Matrix representation- CG.pptx
RubaNagarajan
 
PPTX
Clipping
AMIT VIRAMGAMI
 
PPT
Greedy Algorithm
Waqar Akram
 
PDF
Compilers Design
Akshaya Arunan
 
Lexical analysis - Compiler Design
Muhammed Afsal Villan
 
Ai quantifiers
Tayyaba Jabeen
 
Compiler Design Lecture Notes
FellowBuddy.com
 
Lecture 3,4
shah zeb
 
Line drawing algo.
Mohd Arif
 
Compiler Design
Mir Majid
 
Raster scan system & random scan system
shalinikarunakaran1
 
Techniques & applications of Compiler
Preethi AKNR
 
BackTracking Algorithm: Technique and Examples
Fahim Ferdous
 
4. listbox
chauhankapil
 
Specification-of-tokens
Dattatray Gandhmal
 
Theory of automata and formal language
Rabia Khalid
 
C++ oop
Sunil OS
 
Type Checking(Compiler Design) #ShareThisIfYouLike
United International University
 
7-NFA to Minimized DFA.pptx
SLekshmiNair
 
Attributes of Output Primitives
Renita Santhmayora
 
Matrix representation- CG.pptx
RubaNagarajan
 
Clipping
AMIT VIRAMGAMI
 
Greedy Algorithm
Waqar Akram
 
Compilers Design
Akshaya Arunan
 
Ad

Similar to Richtextbox (20)

PPT
Combo box and List box in VB.Net.ppt
Ujwala Junghare
 
PPSX
Unit2
Abha Damani
 
PPTX
Check,combo,list,picture box
cherrybear2014
 
PPT
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
Rajes Wari
 
PPTX
Vb 6.0 controls
'Bharat Kumar
 
PDF
Unit5
Abha Damani
 
DOCX
Maliram poonia project
Apex institute of engineering & technology
 
PDF
Windows Forms For Beginners Part - 3
Bhushan Mulmule
 
PPTX
Visual Web Developer and Web Controls VB set 3
sunmitraeducation
 
PPTX
Chapter 02
Rooney Joh
 
PDF
Lab1
rksrks
 
PPTX
Controls events
Dalwin INDIA
 
DOCX
Docimp
KaivanShah30
 
DOC
Practicalfileofvb workshop
dhi her
 
PPTX
Sharbani bhattacharya VB Structures
Sharbani Bhattacharya
 
PDF
Visual basic asp.net programming introduction
Hock Leng PUAH
 
PPTX
Commonly used controls and their Properties
Ephraim Quinones
 
PDF
Text Editor By Harsh Mathur.
Harsh Mathur
 
PPTX
Basic controls of Visual Basic 6.0
Salim M
 
PPT
Chapter 02
Terry Yoast
 
Combo box and List box in VB.Net.ppt
Ujwala Junghare
 
Check,combo,list,picture box
cherrybear2014
 
4.7.14&amp;17.7.14&amp;23.6.15&amp;10.9.15
Rajes Wari
 
Vb 6.0 controls
'Bharat Kumar
 
Windows Forms For Beginners Part - 3
Bhushan Mulmule
 
Visual Web Developer and Web Controls VB set 3
sunmitraeducation
 
Chapter 02
Rooney Joh
 
Lab1
rksrks
 
Controls events
Dalwin INDIA
 
Docimp
KaivanShah30
 
Practicalfileofvb workshop
dhi her
 
Sharbani bhattacharya VB Structures
Sharbani Bhattacharya
 
Visual basic asp.net programming introduction
Hock Leng PUAH
 
Commonly used controls and their Properties
Ephraim Quinones
 
Text Editor By Harsh Mathur.
Harsh Mathur
 
Basic controls of Visual Basic 6.0
Salim M
 
Chapter 02
Terry Yoast
 
Ad

More from Amandeep Kaur (20)

PPTX
Video/ Graphics cards
Amandeep Kaur
 
DOCX
Menu vb
Amandeep Kaur
 
PPTX
Menu pop up menu mdi form and playing audio in vb
Amandeep Kaur
 
PPT
Active x control
Amandeep Kaur
 
PPTX
Image contro, and format functions in vb
Amandeep Kaur
 
PPTX
Data base connectivity and flex grid in vb
Amandeep Kaur
 
PPTX
Toolbar, statusbar, coolbar in vb
Amandeep Kaur
 
PPTX
Treeview listview
Amandeep Kaur
 
PPTX
Progress bar
Amandeep Kaur
 
PPTX
Filehandling
Amandeep Kaur
 
DOC
Socket
Amandeep Kaur
 
PPT
Ppt of socket
Amandeep Kaur
 
PPT
Introduction to computer graphics
Amandeep Kaur
 
PPT
Introduction to computer graphics
Amandeep Kaur
 
PPT
Introduction to computer graphics
Amandeep Kaur
 
PPT
Internet
Amandeep Kaur
 
DOCX
Internet working
Amandeep Kaur
 
DOC
Report on browser war
Amandeep Kaur
 
DOC
Report of internet connections
Amandeep Kaur
 
DOCX
Report on intranet
Amandeep Kaur
 
Video/ Graphics cards
Amandeep Kaur
 
Menu vb
Amandeep Kaur
 
Menu pop up menu mdi form and playing audio in vb
Amandeep Kaur
 
Active x control
Amandeep Kaur
 
Image contro, and format functions in vb
Amandeep Kaur
 
Data base connectivity and flex grid in vb
Amandeep Kaur
 
Toolbar, statusbar, coolbar in vb
Amandeep Kaur
 
Treeview listview
Amandeep Kaur
 
Progress bar
Amandeep Kaur
 
Filehandling
Amandeep Kaur
 
Ppt of socket
Amandeep Kaur
 
Introduction to computer graphics
Amandeep Kaur
 
Introduction to computer graphics
Amandeep Kaur
 
Introduction to computer graphics
Amandeep Kaur
 
Internet
Amandeep Kaur
 
Internet working
Amandeep Kaur
 
Report on browser war
Amandeep Kaur
 
Report of internet connections
Amandeep Kaur
 
Report on intranet
Amandeep Kaur
 

Richtextbox

  • 2.  Timer Contol  Combobox  Rich Textbox  Slider Contents
  • 3.  Timer Control Works like a stopwatch or alarm clock  Timer control counts repeatedly as long as enabled property is set to true  Interval: It specifies the interval between Timer events in milliseconds Timer Control
  • 5. Dim counter As Integer  Private Sub cmdend_Click()  Timer1.Enabled = False  End Sub  Private Sub cmdstart_Click()  Timer1.Enabled = True  End Sub  Private Sub Timer1_Timer()  counter = counter + 1  If counter = 95 Then  counter = 1  End If  If counter = 1 Then  Shape1.FillColor = vbRed  Shape2.FillColor = vbWhite  Shape3.FillColor = vbWhite  End If Coding
  • 6.  If counter = 45 Then  Shape1.FillColor = vbWhite  Shape2.FillColor = vbYellow  Shape3.FillColor = vbWhite  End If  If counter = 50 Then  Shape1.FillColor = vbWhite  Shape2.FillColor = vbWhite  Shape3.FillColor = vbGreen  End If  End Sub
  • 8.  Features of Text box and List box  It is used to present list to the User  This control allow the user to select an item either by typing into the Combo box, or by selecting it from the list  It contains an edit field Combo Box Control
  • 9.  Three Styles Combo Box  The drop down combo Box  The Simple combo Box  The drop down list Combo Box Styles
  • 10. Drop down Combo Box Style 0 Simple Combo Box Style 1 Drop Down List Box Style 2
  • 12.  Coding  Dim a, b  Private Sub cmdshowdate_Click()  lblcombo.Caption = Combo2.Text + " " + Combo3.Text + "," + Combo4.Text  End Sub  Private Sub Combo1_click()  If Combo1.ListIndex = 0 Then  lblcombo.ForeColor = vbRed  End If  If Combo1.ListIndex = 1 Then  lblcombo.ForeColor = vbGreen  End If  If Combo1.ListIndex = 2 Then  lblcombo.ForeColor = vbBlue  End If  End Sub Combo Box Application
  • 13. Private Sub Form_Load()  Combo1.AddItem "Red"  Combo1.AddItem "Green"  Combo1.AddItem "Blue"  a=0  Do While a < 31  a=a+1  Combo3.AddItem a  Loop  b = 1900  Do While b < 2012  b=b+1  Combo4.AddItem b  Loop Conti…
  • 14.  Combo2.AddItem "Jan"  Combo2.AddItem "Feb"  Combo2.AddItem "March"  Combo2.AddItem "April"  Combo2.AddItem "May"  Combo2.AddItem "June"  Combo2.AddItem "july"  Combo2.AddItem "August"  Combo2.AddItem "September"  Combo2.AddItem "October"  Combo2.AddItem "November"  Combo2.AddItem "December"  End Sub Conti…
  • 16.  The Rich Text Box Control allows the user to enter and edit text while also providing more advanced formatting features than the conventional TextBox control.  Syntax: RichTextBox Rich Text Box
  • 17. How to Open Rich Text Box
  • 19.  Private Sub cmdrtbbox_Click()  rtb1.Text = "The rich text box support underlines, Bold and Italic text."  rtb1.SelStart = rtb1.Find("underlines")  rtb1.Span ("underlines")  rtb1.SelUnderline = True  rtb1.SelStart = 0  rtb1.SelStart = rtb1.Find("Bold")  rtb1.Span ("Bold")  rtb1.SelBold = True Conti…
  • 20.  rtb1.SelStart = 0  rtb1.SelStart = rtb1.Find("Italic")  rtb1.Span ("Italic")  rtb1.SelItalic = True  rtb1.SelStart = 0  rtb1.SelStart = rtb1.Find("underlines")  rtb1.Span ("underlines")  rtb1.SelFontName = "Arial"  rtb1.SelFontSize = 18  End Sub Conti…
  • 22.  To Set the value of a point on a graph  To select the range of number to be passed into the array  To resize a form, field or other graphic object Slider Control
  • 23. How to open a slider
  • 24.  Value  Min, Max  Tickfrequency  Tickstyle  Smallchange  Largespace  Select range  Selstart  Sellength Operations using Slider
  • 27.  ccOrientationhorizontal (value 0, the default)  Orients the slider horizontally  ccOrientationvertical (value1)  Orients the slider vertically  Slider1.orientation=ccorientationvertical Selecting a Slider’s Orientation
  • 29.  Private Sub Form_Load()  Slider1.Max = 250  Slider1.Min = 0  Slider1.LargeChange = 5  Slider1.TickFrequency = 25  End Sub  Private Sub Slider1_Change()  txt1.Text = "slider position" & Str(Slider1.Value)  End Sub Handling Slider Events
  • 31.  Private Sub Form_Load()  Slider1.Max = 100  Slider1.Min = 0  Slider1.LargeChange = 5  Slider1.TickFrequency = 10  Slider1.TickStyle = sldNoTicks  End Sub