home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD13572192001.psc / frmFind.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-01-10  |  3.3 KB  |  114 lines

  1. VERSION 5.00
  2. Begin VB.Form frmFind 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Find and Replace"
  5.    ClientHeight    =   1305
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4815
  9.    Icon            =   "frmFind.frx":0000
  10.    LinkTopic       =   "Form2"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   1305
  14.    ScaleWidth      =   4815
  15.    StartUpPosition =   1  'CenterOwner
  16.    Begin VB.CheckBox Check1 
  17.       Caption         =   "Match Case"
  18.       Height          =   255
  19.       Left            =   120
  20.       TabIndex        =   6
  21.       Top             =   960
  22.       Width           =   1455
  23.    End
  24.    Begin VB.CommandButton Command4 
  25.       Caption         =   "All"
  26.       Height          =   375
  27.       Left            =   3720
  28.       TabIndex        =   5
  29.       Top             =   480
  30.       Width           =   975
  31.    End
  32.    Begin VB.CommandButton Command3 
  33.       Caption         =   "Replace"
  34.       Height          =   375
  35.       Left            =   2520
  36.       TabIndex        =   4
  37.       Top             =   480
  38.       Width           =   975
  39.    End
  40.    Begin VB.ComboBox Replaceme 
  41.       Height          =   315
  42.       Left            =   2520
  43.       TabIndex        =   3
  44.       Top             =   120
  45.       Width           =   2175
  46.    End
  47.    Begin VB.CommandButton Command2 
  48.       Caption         =   "Next"
  49.       Height          =   375
  50.       Left            =   1320
  51.       TabIndex        =   2
  52.       Top             =   480
  53.       Width           =   975
  54.    End
  55.    Begin VB.CommandButton Command1 
  56.       Caption         =   "Find"
  57.       Height          =   375
  58.       Left            =   120
  59.       TabIndex        =   1
  60.       Top             =   480
  61.       Width           =   975
  62.    End
  63.    Begin VB.ComboBox Findme 
  64.       Height          =   315
  65.       Left            =   120
  66.       TabIndex        =   0
  67.       Top             =   120
  68.       Width           =   2175
  69.    End
  70. Attribute VB_Name = "frmFind"
  71. Attribute VB_GlobalNameSpace = False
  72. Attribute VB_Creatable = False
  73. Attribute VB_PredeclaredId = True
  74. Attribute VB_Exposed = False
  75. Private Sub Command1_Click() 'Find
  76. Dim h As Integer
  77. Dim x As Integer
  78. Dim textfound As Long
  79. Dim Position As Long
  80. 'Update our combobox and avoid duplication
  81. If Findme.Text <> "" Then
  82.     h = 0
  83.     For x = 0 To Findme.ListCount - 1
  84.         If Findme.Text = Findme.List(x) Then h = 1
  85.     Next x
  86.     If h = 0 Then Findme.AddItem Findme.Text, (0)
  87.     MsgBox "Search for what ??"
  88.     Exit Sub
  89. End If
  90.     If Check1.Value Then 'match case
  91.         textfound = Form1.rtftext.Find(Findme.Text, 0, , rtfMatchCase)
  92.     Else
  93.         textfound = Form1.rtftext.Find(Findme.Text, 0)
  94.     End If
  95.     If textfound <> -1 Then 'Found it !
  96.         Form1.rtftext.SetFocus
  97.     Else 'No I didn't
  98.         MsgBox "Cant find it !!", vbExclamation, "Bobo Enterprises"
  99.     End If
  100. End Sub
  101. Private Sub Command2_Click()
  102. Dim textfound As Long
  103. Dim Position As Long
  104. 'Same as Find except we start at the cursor instead of
  105. 'the top o.CommandButton Cot,(t9ce0otsSiE" Then
  106.     hmmandBusaf
  107. End Sub
  108. Private Sub C Command2_Click()
  109. Dim textfound As LxrivaahCaa)s)uim textfound As Lxrit
  110. 'th?M Thd IfIlt ft     =   1305.TexoLxrit
  111. 'th?M Thd IfIlit Fo.bhuwS(((((((((((S(bExclamick()
  112. Dim textfounds )adme (t9s
  113.     hmmau35
  114.