Activity Stream
48,167 MEMBERS
6715 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 3 of 3
  1.     
    #1
    Banned
    Website's:
    WarezRelease.org ThatHosting.co

    Default how to load text from file

    hi, i wanna load text from file to multiple txt box eg...

    name
    age
    gender

    i got this code + the file can be: chris.txt, john.txt basically can be anything wit ".txt" but the filename is in the treeview, but there is multiple nodes.?

    anyways:

    Code: 
    Dim myDir As IO.StreamReader( i dunno the path, tried app.startuppath )
    
    Dim txt As String
    
    For each file in IO.StreamReader("*.txt")
    
    Next
    then something like, cnt remember as i deleted it, but:
    Code: 
    txt.Stream.ReadLine.Contains("name=")
    
    txtbox.text = txt
    this dnt work at least i get no errors.

    its vb.net 2010

    any help?
    Chris2k Reviewed by Chris2k on . how to load text from file hi, i wanna load text from file to multiple txt box eg... name age gender i got this code + the file can be: chris.txt, john.txt basically can be anything wit ".txt" but the filename is in the treeview, but there is multiple nodes.? anyways: Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member

  4.     
    #3
    Banned
    Website's:
    dcrewposter.com z51.co.uk
    Dim str1 As String = My.Computer.FileSystem.ReadAllText(Application.Sta rtupPath & "\name.txt")
    Dim str2() As String = str1.Split(Environment.NewLine)
    For i = 0 To str2.Count - 1 Do
    Dim str3() As String = str2( i).Split("=")
    If str3( 0).ToString = "name" Then
    TextBoxName.Text = TextBoxName.Text & Environment.NewLine & str3(1)
    ElseIf str3( 0).ToString = "lastname" Then
    TextBoxLastname.Text = TextBoxLastname.text & Environment.NewLine & str3(1)
    End If
    Next

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Text editor that would be able to open a file size of 3 gig+?
    By AlternativeWeb in forum Technical Help Desk Support
    Replies: 6
    Last Post: 24th May 2012, 04:38 PM
  2. [Selling] Text Effect which you can use for your website. 2$ per copy!(PSD File)
    By Miko3209 in forum Completed Transactions
    Replies: 5
    Last Post: 16th Oct 2011, 03:32 PM
  3. how to get video file information to a text file
    By kejrud in forum Technical Help Desk Support
    Replies: 6
    Last Post: 2nd Jul 2011, 09:57 PM
  4. 100 Posts Needed $3 (Just Text File With BB-Code)
    By elpirata in forum Community Cooperative
    Replies: 0
    Last Post: 11th Jan 2011, 06:55 PM
  5. [Hiring] Just Post File Maker (Text file BB-Code) $3
    By elpirata in forum Completed Transactions
    Replies: 0
    Last Post: 11th Jan 2011, 06:46 PM

Tags for this Thread

BE SOCIAL