Habe ein problem i.was stimmt hier nicht ,aber ich weis nicht was .Erkennt ihr vllt. denn fehler?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Public Class Form7 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Or TextBox2.Text = "" Then MsgBox("Geben sie bitte ein Name/Password ein!", MsgBoxStyle.Critical, "Text fehlt!") Else Dim chatroom As String = Me.TextBox1.Text Try Dim Nachricht As String = Me.TextBox2.Text Dim Chatprotokoll As String Try Chatprotokoll = My.Computer.FileSystem.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\login\" & chatroom & ".txt") Catch Chatprotokoll = "" End Try Dim uploadstring As String = Chatprotokoll & Nachricht My.Computer.FileSystem.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\login\" & chatroom & "_upload.txt", uploadstring, False) My.Computer.Network.UploadFile(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\login\" & chatroom & "_upload.txt", "ftp://name.net/" & chatroom & ".txt", "name", "password") Catch End Try End If End Sub End Class