CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 2380|Reply: 6

Baca file dalam bentuk .txt dlm VB

[Copy link]
ieeya This user has been deleted
Post time 3-1-2007 09:57 PM | Show all posts |Read mode
Hai.....sy ni baru nk belanja msk forum...klau silap maaf la ek!

Soalan sy; Cmner nak baca file yg dlm btk .txt dlm applikasi yg menggunakan vb
Reply

Use magic Report


ADVERTISEMENT


ieeya This user has been deleted
 Author| Post time 3-1-2007 09:59 PM | Show all posts
Harap ada yg sudi membantu..........
Reply

Use magic Report

Post time 4-1-2007 09:35 AM | Show all posts
try surf kat http://www.codeguru.com/forum atau http://www.vbforums.com dlm tu ade byk sample..try search under thread utk vb6
Reply

Use magic Report

Post time 4-1-2007 09:42 AM | Show all posts
Reply

Use magic Report

Post time 4-1-2007 12:15 PM | Show all posts
dah tak ingat code dia dah...

something like this:

dim strText as String
Open "namafail.txt" For Input As #1
While Not Eof(1)
     Line input #1, strText ' reads text from line to line
                                         ' pas tu buat la apa yang patut, nak masuk dalam text box ke...
Wend
Close(1)
Reply

Use magic Report

Post time 4-1-2007 12:50 PM | Show all posts
'read the file into array
    Dim sr As System.IO.StreamReader = System.IO.File.OpenText("C:\Weapons.txt")
    Dim StrArray() As String
    Dim sData As String
    'string = contents of file
    sData = sr.ReadToEnd
    'fill array with data
    StrArray = Split(sData, ControlChars.NewLine)
    'close stream
    sr.Close()
Reply

Use magic Report

Follow Us
ieeya This user has been deleted
 Author| Post time 4-1-2007 02:46 PM | Show all posts
Teme kasih semua......Sy akan try semuanya...
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT


Forum Hot Topic

 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

28-12-2024 10:18 PM GMT+8 , Processed in 0.076019 second(s), 21 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list