質問編集履歴

1

改行するよう修正しました。

2019/07/26 08:27

投稿

gyaSon
gyaSon

スコア16

test CHANGED
File without changes
test CHANGED
@@ -69,3 +69,65 @@
69
69
  ご不明な点などがありましたらお申し付けください。
70
70
 
71
71
  御助力の程宜しくお願い致します。
72
+
73
+
74
+
75
+ 追記
76
+
77
+ 改行するよう修正しました。
78
+
79
+ ```ここに言語を入力
80
+
81
+ Public Class Form1
82
+
83
+
84
+
85
+ Private Sub Button1_Click(ByVal sender As System.Object,
86
+
87
+ ByVal e As System.EventArgs) Handles Button1.Click
88
+
89
+ 'テキストファイルを上書きで保存する
90
+
91
+ Dim sw As New System.IO.StreamWriter("....\log_output.txt", False, System.Text.Encoding.Default)
92
+
93
+ '書込み
94
+
95
+ sw.Write(TextBox1.Text)
96
+
97
+ sw.Close()
98
+
99
+
100
+
101
+
102
+
103
+ End Sub
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ Private Sub Button2_Click(ByVal sender As System.Object,
112
+
113
+ ByVal e As System.EventArgs) Handles Button2.Click
114
+
115
+ 'テキストファイルを追加書込みで保存する
116
+
117
+ Dim sw1 As New System.IO.StreamWriter("....\log_output.txt", True, System.Text.Encoding.Default)
118
+
119
+ '書込み(上記で作成したファイルに書き込んでいます)
120
+
121
+ sw1.Write("," & TextBox1.Text, Environment.NewLine)
122
+
123
+ sw1.Close() '結果 texebox1の内容追加
124
+
125
+ End Sub
126
+
127
+
128
+
129
+
130
+
131
+ End Class
132
+
133
+ ```