home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 13 / CD_ASCQ_13_0494.iso / maj / 1697 / samples / frmrepla.frm < prev    next >
Text File  |  1993-10-15  |  3KB  |  101 lines

  1. VERSION 2.00
  2. Begin Form frmReplaceConfirm 
  3.    Caption         =   "Replace Confirm"
  4.    Height          =   1575
  5.    Left            =   975
  6.    LinkTopic       =   "Form1"
  7.    ScaleHeight     =   1170
  8.    ScaleWidth      =   4470
  9.    Top             =   705
  10.    Width           =   4590
  11.    Begin CommandButton cmdCancel 
  12.       Cancel          =   -1  'True
  13.       Caption         =   "&Cancel"
  14.       Height          =   345
  15.       Left            =   3570
  16.       TabIndex        =   4
  17.       Top             =   660
  18.       Width           =   855
  19.    End
  20.    Begin CommandButton cmdAll 
  21.       Caption         =   "&All"
  22.       Height          =   345
  23.       Left            =   2700
  24.       TabIndex        =   3
  25.       Top             =   660
  26.       Width           =   855
  27.    End
  28.    Begin CommandButton cmdOne 
  29.       Caption         =   "&One"
  30.       Height          =   345
  31.       Left            =   1830
  32.       TabIndex        =   2
  33.       Top             =   660
  34.       Width           =   855
  35.    End
  36.    Begin CommandButton cmdNo 
  37.       Caption         =   "&No"
  38.       Height          =   345
  39.       Left            =   960
  40.       TabIndex        =   1
  41.       Top             =   660
  42.       Width           =   855
  43.    End
  44.    Begin CommandButton cmdYes 
  45.       Caption         =   "&Yes"
  46.       Default         =   -1  'True
  47.       Height          =   345
  48.       Left            =   90
  49.       TabIndex        =   0
  50.       Top             =   660
  51.       Width           =   855
  52.    End
  53.    Begin Label Label1 
  54.       Alignment       =   2  'Center
  55.       Caption         =   "Replace this occurrence?"
  56.       Height          =   285
  57.       Left            =   0
  58.       TabIndex        =   5
  59.       Top             =   120
  60.       Width           =   4485
  61.    End
  62. End
  63. Option Explicit
  64.  
  65. Sub cmdAll_Click ()
  66.     Dim FoundIt As Integer
  67.     Unload Me               ' unload this form
  68.     gfRecursiveSearch = 2'replace all
  69.     frmMDI.ActiveForm.Text1.SelText = gNewText
  70.     'frmMDI.ActiveForm.Text1.Redraw = False
  71.     'SendKeys gNewText, True ' replace found text
  72.     'frmMDI.ActiveForm.Text1.Redraw = True
  73. End Sub
  74.  
  75. Sub cmdCancel_Click ()
  76.     Unload Me
  77. End Sub
  78.  
  79. Sub cmdNo_Click ()
  80.     Unload Me               ' unload this form
  81.     gfRecursiveSearch = 1'repeat the operation
  82. End Sub
  83.  
  84. Sub cmdOne_Click ()
  85.     Unload Me               ' unload this form
  86.     frmMDI.ActiveForm.Text1.SelText = gNewText
  87.     'frmMDI.ActiveForm.Text1.Redraw = False
  88.     'SendKeys gNewText, True ' replace found text
  89.     'frmMDI.ActiveForm.Text1.Redraw = True
  90. End Sub
  91.  
  92. Sub cmdYes_Click ()
  93.     Unload Me               ' unload this form
  94.     frmMDI.ActiveForm.Text1.SelText = gNewText
  95.     'frmMDI.ActiveForm.Text1.Redraw = False
  96.     'SendKeys gNewText, True ' replace found text
  97.     'frmMDI.ActiveForm.Text1.Redraw = True
  98.     gfRecursiveSearch = 1'repeat operation
  99. End Sub
  100.  
  101.