Question Serch Within (Pictures)

griffithdesign

Active member
Joined
Sep 17, 2008
Messages
34
Programming Experience
Beginner
I currently have a application that is running when I click the buttons. I made a release of this program but a different version a while ago and I have gotten many replies back to me asking me to add new things. First thing they were asking is to have a server button so they can search for what they are looking for. Second they asked for sounds.

HelpTool.jpg


Searching:
As seen on the image there is a RichTextBox1 and there is a TextBox1. The information when you click on one of the buttons will display in the RichTextBox1 but I want the TextBox1 to search any information that is displayed in the RichTextBox1. If it is also possible to highlight or to select the text that would be even better. I only want it to search when you hit the search button found directly left of TextBox1.

Sounds:
I already have a .wav I want to use and I have already uploaded it into my resources. But how to I get it to when I click the buttons it plays the sound of the .wav. The .wav sound document name is called click.wav. So how do I get it so when I click on a button it players that sound.


Thanks to everyone and anyone who looks or posts.​
 
1. The Find method of the RichTextBox will locate the text you specify. You can then set the SelectionStart and SelectionLength properties to select the text.

2.
VB.NET:
Dim data As IO.Stream = My.Resources.Click
Dim length As Integer = CInt(data.Length)
Dim buffer(length - 1) As Byte

data.Read(buffer, 0, length)
My.Computer.Audio.Play(buffer, AudioPlayMode.Background)
 
Back
Top