home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / PGUIDE / CONTROLS / TEXT.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-09-16  |  5.4 KB  |  165 lines

  1. VERSION 5.00
  2. Begin VB.Form frmText 
  3.    Caption         =   "Text Box Properties"
  4.    ClientHeight    =   4455
  5.    ClientLeft      =   930
  6.    ClientTop       =   1290
  7.    ClientWidth     =   6915
  8.    Height          =   4860
  9.    Left            =   870
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4455
  12.    ScaleWidth      =   6915
  13.    Top             =   945
  14.    Width           =   7035
  15.    Begin VB.CommandButton cmdReset 
  16.       Caption         =   "&Reset"
  17.       Height          =   495
  18.       Left            =   2400
  19.       TabIndex        =   2
  20.       Top             =   3720
  21.       Width           =   1215
  22.    End
  23.    Begin VB.CommandButton cmdClose 
  24.       Cancel          =   -1  'True
  25.       Caption         =   "&Close"
  26.       Height          =   495
  27.       Left            =   5280
  28.       TabIndex        =   3
  29.       Top             =   3720
  30.       Width           =   1215
  31.    End
  32.    Begin VB.Frame fraInsert 
  33.       Caption         =   "Set the Insertion Point"
  34.       Height          =   2295
  35.       Left            =   360
  36.       TabIndex        =   5
  37.       Top             =   1200
  38.       Width           =   3255
  39.       Begin VB.OptionButton optText 
  40.          Caption         =   "Insert &Text"
  41.          Height          =   255
  42.          Left            =   360
  43.          TabIndex        =   9
  44.          Top             =   1800
  45.          Width           =   2055
  46.       End
  47.       Begin VB.OptionButton optSelect 
  48.          Caption         =   "&Select All Text"
  49.          Height          =   255
  50.          Left            =   360
  51.          TabIndex        =   8
  52.          Top             =   1440
  53.          Width           =   2055
  54.       End
  55.       Begin VB.OptionButton optInsert 
  56.          Caption         =   "&Insertion Point After 5th Character"
  57.          Height          =   255
  58.          Left            =   360
  59.          TabIndex        =   7
  60.          Top             =   1080
  61.          Width           =   2775
  62.       End
  63.       Begin VB.OptionButton optEnd 
  64.          Caption         =   "Insertion Point at &End"
  65.          Height          =   255
  66.          Left            =   360
  67.          TabIndex        =   6
  68.          Top             =   720
  69.          Width           =   1815
  70.       End
  71.       Begin VB.OptionButton optDefault 
  72.          Caption         =   "&Default Settings"
  73.          Height          =   255
  74.          Left            =   360
  75.          TabIndex        =   1
  76.          Top             =   360
  77.          Value           =   -1  'True
  78.          Width           =   1815
  79.       End
  80.    End
  81.    Begin VB.TextBox txtDisplay 
  82.       Height          =   375
  83.       HideSelection   =   0   'False
  84.       Left            =   360
  85.       TabIndex        =   0
  86.       Text            =   "The MultiLine property is set to False in this example"
  87.       Top             =   480
  88.       Width           =   3255
  89.    End
  90.    Begin VB.TextBox txtMulti 
  91.       Height          =   615
  92.       Left            =   4080
  93.       MultiLine       =   -1  'True
  94.       TabIndex        =   4
  95.       TabStop         =   0   'False
  96.       Text            =   "Text.frx":0000
  97.       Top             =   480
  98.       Width           =   2415
  99.    End
  100.    Begin VB.Label lblHelp 
  101.       Caption         =   "Select an option to see its effect on the first text box."
  102.       Height          =   735
  103.       Left            =   4200
  104.       TabIndex        =   10
  105.       Top             =   2160
  106.       Width           =   2295
  107.    End
  108. Attribute VB_Name = "frmText"
  109. Attribute VB_Base = "0{1D9367A3-C9EF-11CF-84BA-00AA00C007F0}"
  110. Attribute VB_Creatable = False
  111. Attribute VB_TemplateDerived = False
  112. Attribute VB_PredeclaredId = True
  113. Attribute VB_Exposed = False
  114. Attribute VB_Customizable = False
  115. Private Sub cmdClose_Click()
  116.     Unload Me   ' Unload this form.
  117. End Sub
  118. Private Sub cmdReset_Click()
  119.     ' restore the original text
  120.     txtDisplay.Text = "The MultiLine property is set to False in this example"
  121.     ' reset the option buttons to the default
  122.     optDefault.Value = True
  123. End Sub
  124. Private Sub optDefault_Click()
  125.     ' place the insertion point at the beginning
  126.     txtDisplay.SelStart = 0
  127.     ' set the focus to the text box so we can see
  128.     ' the result of our settings
  129.     txtDisplay.SetFocus
  130. End Sub
  131. Private Sub optEnd_Click()
  132.     ' find the length of the string and place
  133.     ' the insertion point at the end
  134.     txtDisplay.SelStart = Len(txtDisplay.Text)
  135.     ' set the focus to the text box so we can see
  136.     ' the result of our settings
  137.     txtDisplay.SetFocus
  138. End Sub
  139. Private Sub optInsert_Click()
  140.     ' place the insertion point after 5th char
  141.     txtDisplay.SelStart = 5
  142.         
  143.     ' set the focus to the text box so we can see
  144.     ' the result of our settings
  145.     txtDisplay.SetFocus
  146. End Sub
  147. Private Sub optSelect_Click()
  148.     ' place the insertion point at the beginning
  149.     txtDisplay.SelStart = 0
  150.     ' find the length of the string and
  151.     ' select that number of characters
  152.     txtDisplay.SelLength = Len(txtDisplay.Text)
  153.     ' set the focus to the text box so we can see
  154.     ' the result of our settings
  155.     txtDisplay.SetFocus
  156. End Sub
  157. Private Sub optText_Click()
  158.     ' insert "NEW STRING" at the insertion point -
  159.     ' if text is selected, it will be replaced
  160.     txtDisplay.SelText = "NEW TEXT"
  161.     ' set the focus to the text box so we can see
  162.     ' the result of our settings
  163.     txtDisplay.SetFocus
  164. End Sub
  165.