タイトル : Re^4: テキストファイルからの文字読取り 投稿日 : 2009/01/25(Sun) 15:51 投稿者 : チキン
すみません、結局解決しておりません。 下が問題のソースです。 Dim FCnt As Long Dim FMax As Long Dim WHd As Long Dim srFile As New System.IO.FileInfo("\A.txt") If srFile.Exists = True Then Dim FSize As Long = srFile.Length FMax = Int(FSize / 9) - 1 FCnt = 0 WHd = 0 Dim sbFile As New System.IO.StreamReader("\A.txt", System.Text.Encoding.GetEncoding("Shift-JIS")) sbFile.BaseStream.Seek(rec * 9, IO.SeekOrigin.Begin) Dim strLine As String = sbFile.ReadLine() Do Until FCnt > FMax - 1 No.Text = strLine.Substring(WHd, 3) Name.Text = strLine.Substring(WHd + 3, 6) FCnt = FCnt + 1 WHd = WHd + 9 Loop End If よろしくお願いします。 |