home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
code
/
cdspy
/
f_seek.frm
< prev
next >
Wrap
Text File
|
1995-02-27
|
4KB
|
135 lines
VERSION 2.00
Begin Form F_Seek
BorderStyle = 3 'Fixed Double
Caption = "Suchen"
ClientHeight = 1560
ClientLeft = 1785
ClientTop = 4170
ClientWidth = 3180
Height = 1965
Left = 1725
LinkTopic = "Form1"
ScaleHeight = 1560
ScaleWidth = 3180
Top = 3825
Width = 3300
Begin CommandButton Cmd_Abbruch
BackColor = &H00C0C0C0&
Caption = "&Abbruch"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 1680
TabIndex = 3
Top = 1020
Width = 1365
End
Begin TextBox Txt_Stichwort
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 360
Left = 180
TabIndex = 1
Top = 450
Width = 2865
End
Begin CommandButton Cmd_Suche
BackColor = &H00C0C0C0&
Caption = "&Suchen"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 180
TabIndex = 2
Top = 1020
Width = 1365
End
Begin Line Line1
X1 = 180
X2 = 3060
Y1 = 900
Y2 = 900
End
Begin Label Label1
AutoSize = -1 'True
Caption = "Suchen nach:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 240
Left = 180
TabIndex = 0
Top = 180
Width = 1200
End
End
Option Explicit
Option Compare Text
Sub Cmd_Abbruch_Click ()
Unload Me
End Sub
Sub Cmd_Suche_Click ()
Dim Pos%
screen.MousePointer = 11 ' Sanduhr
Pos% = InStr(Editfile.Text1, Txt_Stichwort.Text)
If Pos% = 0 Then
screen.MousePointer = 0' Default
MsgBox "Der gesuchte Ausdruck ist nicht vorhanden.", 48, "Suchen"
Txt_Stichwort.SetFocus
Exit Sub
End If
Editfile.Text1.SelStart = Pos% - 1
Editfile.Text1.SelLength = Len(Txt_Stichwort.Text)
GM_SeekString$ = Txt_Stichwort.Text
Unload Me
screen.MousePointer = 0 ' Default
End Sub
Sub Form_Load ()
Dim tmp$, Pos%
Me.Move (screen.Width - Me.Width) / 2, (screen.Height - Me.Height) / 3
tmp$ = Editfile.Text1.SelText
If tmp$ <> "" Then ' Suchbegriff evtl. markiert
Pos% = InStr(tmp$, Chr$(13))
If Pos% <> 0 Then
tmp$ = Left$(tmp$, Pos% - 1)
End If
Me.Txt_Stichwort = Trim$(tmp$)
End If
End Sub
Sub Form_Resize ()
Show3d Me
End Sub
Sub Txt_Stichwort_GotFocus ()
Txt_Stichwort.SelStart = 0
Txt_Stichwort.SelLength = Len(Txt_Stichwort.Text)
End Sub
Sub Txt_Stichwort_KeyPress (KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
Cmd_Suche = True
End If
End Sub