[Help]notepad search function

Posts 1–15 of 31 · Page 1 of 3
[Help]notepad search function
well, im working on a notepad and i just miss a search function.

can anybody help me ?
what ya mean with search funktion ? Like google search...?
More Info
Quote Originally Posted by Sydney View Post
what ya mean with search funktion ? Like google search...?
More Info


you know, that one. this is in notepad which is on the pc from before.
You gotta make a new form. I'd suggest you to highlight each found entry :P
Quote Originally Posted by Blubb1337 View Post
You gotta make a new form. I'd suggest you to highlight each found entry :P
id already made new form, but i cant the code xD
hmmm its tricky
ive been trying to find somthing in my book thatll help
if you do find somthing PM me co i need it for my browser


If ctrl f pressed {
ask for word
}

if word found{
highlight it
}

else
{
no found
}


THIS IS AN OUTLINE KTHX VVV
!!!!!!!!!!!PLEASE IGNORE THIS TROLL POST!!!!!!!!!!!
that code is wrong i swear...
Easy is Easy
at most a few lines of code.

The most effective way (easier, you can use a separate form, however, add a Textbox to your tool bar and a button that says find)

Code:


Declare a few things as public ( so you can use them later for replace and find next

'Textbox1 = Find Textbox
'Textbox2 = document

[php]
Public StartPosistion As Integer
Public TargetText As String
[/php]

Create your own function (sub)

[php]
Private Sub Find(ByVal start As Integer)
Dim position As Integer


position = InStr(start, textbox2.Text.ToLower, textbox1.Text.ToLower)
If position > 0 Then
TargetText = position
textbox2.SelectionStart = TargetText - 1
textbox2SelectionLength = Len(TargetText) - (Len(TargetText) - Len(TargetText))

Else
MsgBox("What the ....&*%$")
TargetText = ""
End If
End Sub
[/php]

Now you can search using

[php]
Find(1)
targettext = textbox1.text
[/php]
Quote Originally Posted by NextGen1 View Post
Easy is Easy
at most a few lines of code.

The most effective way (easier, you can use a separate form, however, add a Textbox to your tool bar and a button that says find)

Code:


Declare a few things as public ( so you can use them later for replace and find next

'Textbox1 = Find Textbox
'Textbox2 = document

[php]
Public StartPosistion As Integer
Public TargetText As String
[/php]

Create your own function (sub)

[php]
Private Sub Find(ByVal start As Integer)
Dim position As Integer


position = InStr(start, textbox2.Text.ToLower, textbox1.Text.ToLower)
If position > 0 Then
TargetText = position
textbox2.SelectionStart = TargetText - 1
textbox2SelectionLength = Len(TargetText) - (Len(TargetText) - Len(TargetText))

Else
MsgBox("What the ....&*%$")
TargetText = ""
End If
End Sub
[/php]

Now you can search using

[php]
Find(1)
targettext = textbox1.text
[/php]
So simple, I love it.
what the shit man.

I wasnt trolling i was giving an outline
Quote Originally Posted by Kallisti View Post
what the shit man.

I wasnt trolling i was giving an outline
Well you have noone to blame but yourself, it's like the boy who cried wolf. In every single thread you post troll code, such as this

[php]
IF.GUID.NEEDED = YUS THEN MAKE NEW GUID FOR PROTEKSHUN
[/php]

You can't blame people for automatically assuming that you're posting more troll code when you post something like this:

[php]


If ctrl f pressed {
ask for word
}

if word found{
highlight it
}

else
{
no found
}
[/php]

I mean, sure it's an outline but anyone with half a brain can figure out a basic logical argument for how a search works, getting the actual method itself is what he was asking for .
Well here's my troll post to add to the collection.
Yous banned soon Jdeezy !! D:
Quote Originally Posted by Invidus View Post
Well here's my troll post to add to the collection.
Yous banned soon Jdeezy !! D:
I know

Oh well, alts all the way!
Quote Originally Posted by Jason View Post



I mean, sure it's an outline but anyone with half a brain can figure out a basic logical argument for how a search works, getting the actual method itself is what he was asking for .
Oh so that means hes asking to c&p?
im out. school.
Posts 1–15 of 31 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us