Results 1 to 6 of 6
  1. #1
    jdm95lude's Avatar
    jdm95lude is offline Associate Member
    Join Date
    Feb 2007
    Posts
    304

    Any Programmers?

    Preferbly fluent in vb 2005.....

  2. #2
    Coop77's Avatar
    Coop77 is offline Senior Member
    Join Date
    Jul 2006
    Location
    Venice CA
    Posts
    1,375
    what you need?

  3. #3
    Valac's Avatar
    Valac is offline Member
    Join Date
    Mar 2007
    Location
    AUSTRALIA FTW!
    Posts
    604
    ***ends what do u need made.

  4. #4
    jdm95lude's Avatar
    jdm95lude is offline Associate Member
    Join Date
    Feb 2007
    Posts
    304
    Im designing a VB 2005 program right now and need help reading a txt file and comparing it to what the user entered in a Input box. If you can help me PM me. Please. -Thank you

  5. #5
    Coop77's Avatar
    Coop77 is offline Senior Member
    Join Date
    Jul 2006
    Location
    Venice CA
    Posts
    1,375

    Reading a txt file

    Imports System.IO
    sContents = GetFileContents("C:\test.txt", sErr)

    Public Function GetFileContents(ByVal FullPath As String, Optional ByRef ErrInfo As String = "") As String

    Dim strContents As String
    Dim objReader As StreamReader
    Try

    objReader = New StreamReader(FullPath)
    strContents = objReader.ReadToEnd()
    objReader.Close()
    Return strContents
    Catch Ex As Exception
    ErrInfo = Ex.Message
    End Try
    End Function
    Last edited by Coop77; 04-19-2007 at 10:45 PM.

  6. #6
    Coop77's Avatar
    Coop77 is offline Senior Member
    Join Date
    Jul 2006
    Location
    Venice CA
    Posts
    1,375
    Hrm.. Seems to have taken all the indenting out of that.

    As far as comparing strings, you'll have to be more specific. If you just want to tell if they equal each other you can use String.Compare() or just the == comparison operator.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •