Search for strings in multiline textbox


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Search for strings in multiline textbox

  1. #1
    Join Date
    Dec 2007
    Posts
    1

    Search for strings in multiline textbox

    Hello, I recently made a simple program that uses the winsock control to get logs from another program, my program puts the logs i recieve in a multiline textbox. I wanna know if there was a way to search for string(s)/keyword(s) in the multiline textbox and send a command back when it finds it. I'm still new to coding.

    Example.

    If Text1.text Contains "Stopped Recorder" then
    'action im gonna do
    end if

    If Text1.text Contains "Recording paused" then
    'action im gonna do.

    There are 3 strings I wanna look for. Me = Outside, Me = Inside, Me = Queued

    Thanks!

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Welcome to DevX

    Try
    Code:
    If Instr(Text1.Text, "String To Find") Then
        Msgbox "Text Found"   'do stuff
    Else
       Msgbox "Text Not Found"  'do other stuff
    End If
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Replies: 6
    Last Post: 07-30-2007, 11:02 AM
  2. Replies: 1
    Last Post: 07-07-2006, 05:37 AM
  3. MultiLine TextBox
    By Piyush Gupta in forum VB Classic
    Replies: 18
    Last Post: 07-20-2001, 02:42 PM
  4. MultiLine TextBox
    By Piyush Gupta in forum VB Classic
    Replies: 0
    Last Post: 07-19-2001, 12:16 AM
  5. Replies: 0
    Last Post: 09-12-2000, 11:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center