Results 1 to 3 of 3
-
6th Feb 2011, 04:48 PM #1OPBannedWebsite's:
WarezRelease.org ThatHosting.cohow 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
Code:txt.Stream.ReadLine.Contains("name=") txtbox.text = txt
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
-
6th Feb 2011, 05:05 PM #2Respected Member
Try this link : http://www.bytemycode.com/snippets/snippet/37/
-
6th Feb 2011, 05:24 PM #3BannedWebsite's:
dcrewposter.com z51.co.ukDim 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
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Text editor that would be able to open a file size of 3 gig+?
By AlternativeWeb in forum Technical Help Desk SupportReplies: 6Last Post: 24th May 2012, 04:38 PM -
[Selling] Text Effect which you can use for your website. 2$ per copy!(PSD File)
By Miko3209 in forum Completed TransactionsReplies: 5Last Post: 16th Oct 2011, 03:32 PM -
how to get video file information to a text file
By kejrud in forum Technical Help Desk SupportReplies: 6Last Post: 2nd Jul 2011, 09:57 PM -
100 Posts Needed $3 (Just Text File With BB-Code)
By elpirata in forum Community CooperativeReplies: 0Last Post: 11th Jan 2011, 06:55 PM -
[Hiring] Just Post File Maker (Text file BB-Code) $3
By elpirata in forum Completed TransactionsReplies: 0Last Post: 11th Jan 2011, 06:46 PM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...