Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old August 5th, 2003, 07:24 AM
Anibal Hernande Anibal Hernande is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 33 Anibal Hernande User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
'How to make Search find words no only at the beginning but also in the middle of the

Code:
    'How to make Search find words no only at the beginning but also in the middle of the line?
    Private Sub btnFindMachine_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFindMachine.Click
        Dim srchWord As String
        Dim wordIndex As Integer
        srchWord = InputBox("Enter the Machine Address to search for")
        wordIndex = lstListMachines.FindStringExact(srchWord)
        If wordIndex >= 0 Then
            lstListMachines.TopIndex = wordIndex
            lstListMachines.SelectedIndex = wordIndex
        Else
            wordIndex = lstListMachines.FindString(srchWord)
            If wordIndex >= 0 Then
                lstListMachines.TopIndex = wordIndex
                lstListMachines.SelectedIndex = wordIndex
            Else
                MsgBox("Machine Address " & srchWord & " is not in this list")
            End If
        End If
    End Sub

Reply With Quote
  #2  
Old August 5th, 2003, 10:55 AM
nopoints nopoints is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Windsor ON, Canada
Posts: 459 nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 44 m 22 sec
Reputation Power: 7
what would a line in the list box contain? what are you searching for? are you saying you want to search the entire item to see if it contains that search string?
__________________
Programmer's Corner

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > 'How to make Search find words no only at the beginning but also in the middle of the


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway