Visual basic question ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Visual basic question ? (
/showthread.php?tid=255671)
Visual basic question ? -
park4bmx - 16.05.2011
if anyone here has a good knowledge of Visual basic i have this question
How can i open a file example "test.txt"
And lets say there is this in it
Код:
EXAMPLE
TEST
HOWYOUDOTHIS
VISUALBASIC
And i want to read only 1 line from that file
so lets say i want the line with
HOWYOUDOTHIS
How can i do that ?
i got this but it read line after line
PHP код:
Dim reader As New System.IO.StreamReader(CurDir() & "\" & "test.txt")
Dim str1, str2, str3 As String
str1 = reader.ReadLine("Mesegae1")
str2 = reader.ReadLine("Mesegae2")
str3 = reader.ReadLine("Mesegae3")
reader.Close()
Label5.Text = str1
Label6.Text = str2
Label7.Text = str3
Re: Visual basic question ? -
Norn - 16.05.2011
Quote:
Originally Posted by park4bmx
if anyone here has a good knowledge of Visual basic i have this question
How can i open a file example "test.txt"
And lets say there is this in it
Код:
EXAMPLE
TEST
HOWYOUDOTHIS
VISUALBASIC
And i want to read only 1 line from that file
so lets say i want the line with HOWYOUDOTHIS
How can i do that ?
i got this but it read line after line
PHP код:
Dim reader As New System.IO.StreamReader(CurDir() & "\" & "test.txt")
Dim str1, str2, str3 As String
str1 = reader.ReadLine("Mesegae1")
str2 = reader.ReadLine("Mesegae2")
str3 = reader.ReadLine("Mesegae3")
reader.Close()
Label5.Text = str1
Label6.Text = str2
Label7.Text = str3
|
Success.
Re: Visual basic question ? -
park4bmx - 16.05.2011
well i did say i don't want to read it Line by Line

But tnx anyways
Re: Visual basic question ? -
Norn - 16.05.2011
Quote:
Originally Posted by park4bmx
well i did say i don't want to read it Line by Line 
But tnx anyways
|
Just ****** vb.net ini class then.