|
2009/11/11(Wed) 10:16:33 編集(投稿者) 2009/11/11(Wed) 10:16:30 編集(投稿者)
<pre><pre>すいません 知識不足勉強不足でまだ理解できません
なのでソースコードを書いてみます
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
With ListView1 .View = View.Details
.Columns.Add("日時", 100, HorizontalAlignment.Left) .Columns.Add("番号", 100, HorizontalAlignment.Left)
Using parser As New FileIO.TextFieldParser("aaa.csv", System.Text.Encoding.GetEncoding("SHIFT_JIS")) parser.TextFieldType = FileIO.FieldType.Delimited parser.HasFieldsEnclosedInQuotes = True parser.SetDelimiters(",") ListView1.Items.Clear()
While Not parser.EndOfData
Dim fields As String() = parser.ReadFields()
ListView1.Items.Add(New ListViewItem(fields))
End While
End Using
End With
End Sub
Private Sub ListView1_ColumnClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.ColumnClick
If ListView1.Sorting = SortOrder.Ascending Then ListView1.Sorting = SortOrder.Descending Else ListView1.Sorting = SortOrder.Ascending End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Writer As New IO.StreamWriter("aaa.csv", True, System.Text.Encoding.GetEncoding("Shift-JIS")) Dim Line As String
Line = Me.TextBox1.Text & "," & Me.TextBox2.Text '
Writer.WriteLine(Line) Writer.Close()
End Sub
Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged
End Sub End Class
これからどうすればいいのでしょうか </pre></pre>
|