|
-
Mar 5th, 2004, 02:39 AM
#1
Thread Starter
Addicted Member
Find Text
Hi all!
I’m in need of some assistance, and I hope that someone will explain this to me.
I have added a search feature to my Text Pad but I cannot find any reference for what I’m trying to do.
The first thing is a check box that when checked, will only display an exact match.
The next thing would be 2 radio buttons in a group box. Obviously, one of which is up and the other one is down. And maybe, if someone feels like explaining it, I would also like to know how I can replace all instances of a word at one time.
Here is the code that I'm using now.
VB Code:
Private Sub cmdFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdFind.Click
Dim fMain As New frmMain
fMain = CType(Me.Owner, frmMain)
Dim lstr As String = fMain.tb1.Text()
Dim lstrFind As String = cmbFind.Text
Dim lintSelStart As Int64 = lstr.IndexOf(lstrFind, lintLastIndex)
If lintSelStart = -1 Then
fMain.tb1.Select(0, 0)
lintLastIndex = 0
Else
fMain.tb1.Select()
fMain.tb1.Select(lintSelStart, lstrFind.Length)
lintLastIndex = lintSelStart + 1
End If
End Sub
Private Sub cbCase_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbCase.CheckedChanged
If cbCase.Checked Then
'To do: need code to display only exact match
End If
End Sub
Private Sub cmdReplace_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdReplace.Click
Dim fMain As New frmMain
fMain = CType(Me.Owner, frmMain)
fMain.tb1.SelectedText = tbReplace.Text
End Sub
Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
Me.Close()
End Sub
Thanks in advance for any help!
Last edited by Rally2000; Mar 5th, 2004 at 02:42 AM.
Code:
Dim R1 As Fast
Dim Kawasaki As crap
Dim rash As necessary
If Kawasaki onRoad = True Then
R1.runoverKawasaki
Kawasaki = rash
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|