home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Direkt 1995 #6
/
CDD_6_95.ISO
/
cdd
/
winanw
/
emedit
/
replace.frm
< prev
next >
Wrap
Text File
|
1994-04-27
|
6KB
|
205 lines
VERSION 2.00
Begin Form frmReplace
Caption = "Replace"
ClientHeight = 2985
ClientLeft = 780
ClientTop = 2040
ClientWidth = 4905
Height = 3390
Left = 720
LinkTopic = "Form2"
ScaleHeight = 2985
ScaleWidth = 4905
Top = 1695
Width = 5025
Begin ComboBox comboNewText
Height = 300
Left = 1080
TabIndex = 2
Top = 600
Width = 2535
End
Begin ComboBox comboText
Height = 300
Left = 1080
TabIndex = 0
Top = 210
Width = 2535
End
Begin Frame Frame4
Caption = "Origin"
Height = 975
Left = 2610
TabIndex = 11
Top = 1530
Width = 2055
Begin OptionButton optOrigin
Caption = "&From cursor"
Height = 285
Index = 1
Left = 240
TabIndex = 13
Top = 240
Value = -1 'True
Width = 1575
End
Begin OptionButton optOrigin
Caption = "&Entire Scope"
Height = 285
Index = 0
Left = 240
TabIndex = 12
Top = 600
Width = 1575
End
End
Begin Frame Frame1
Caption = "Direction"
Height = 570
Left = 120
TabIndex = 7
Top = 2310
Width = 2175
Begin OptionButton optDirection
Caption = "&Down"
Height = 252
Index = 1
Left = 960
TabIndex = 9
Top = 240
Value = -1 'True
Width = 852
End
Begin OptionButton optDirection
Caption = "&Up"
Height = 252
Index = 0
Left = 240
TabIndex = 8
Top = 240
Width = 612
End
End
Begin CheckBox chkCase
Caption = "Match &Case"
Height = 375
Left = 240
TabIndex = 5
Top = 1320
Width = 1455
End
Begin CommandButton cmdcancel
Cancel = -1 'True
Caption = "Cancel"
Height = 372
Left = 3720
TabIndex = 4
Top = 600
Width = 1092
End
Begin CommandButton cmdOK
Caption = "&OK"
Default = -1 'True
Height = 372
Left = 3720
TabIndex = 3
Top = 120
Width = 1092
End
Begin Frame Frame2
Caption = "Options"
Height = 975
Left = 120
TabIndex = 10
Top = 1080
Width = 2175
Begin CheckBox chkWholeWords
Caption = "&Whole Words Only"
Height = 315
Left = 120
TabIndex = 6
Top = 600
Width = 1935
End
End
Begin Label Label2
Caption = "&New Text:"
Height = 255
Left = 120
TabIndex = 14
Top = 600
Width = 975
End
Begin Label Label1
Caption = "Fi&nd What:"
Height = 255
Index = 0
Left = 120
TabIndex = 1
Top = 240
Width = 975
End
End
Option Explicit
Sub cmdCancel_Click ()
' gFindString = comboText.Text
Hide
End Sub
Sub cmdOK_Click ()
Dim TargetText As String
Dim NewText As String
Dim MatchCase As Integer
Dim WholeWordOnly As Integer
Dim UpDirection As Integer
Dim BeginScope As Integer
Dim FoundIt As Integer
' It seems that VB does not let you pass control properties directly, so you are
' preventing from writing...
' FindIt comboText.Text, MatchCase, WholeWordOnly, optScope(0).Value, optDirection(0).Value, optOrigin(0).Value
' ...instead you have to assign the properites to variables and then pass the variables.
' Kinda lame.
TargetText = comboText.Text
NewText = comboNewText.Text
BeginScope = optOrigin(0).Value
UpDirection = optDirection(0).Value
If chkCase.Value = 1 Then
MatchCase = True
Else
MatchCase = False
End If
If chkWholeWords.Value = 1 Then
WholeWordOnly = True
Else
WholeWordOnly = False
End If
' gFindString = comboText.Text
UpdateComboList comboText, TargetText ' add text to combo list if not already exists
UpdateComboList comboNewText, NewText
Hide
FoundIt = FindIt(TargetText, MatchCase, WholeWordOnly, UpDirection, BeginScope, NewText, True)
End Sub
Sub comboText_Change ()
If comboText.Text = "" Then
cmdOK.Enabled = False
Else
cmdOK.Enabled = True
End If
End Sub
Sub Form_Load ()
cmdOK.Enabled = False
'gFindDirection = 1
End Sub
Sub optDirection_Click (Index As Integer)
'gFindDirection = Index
End Sub