Hallo ich habe hier 2 Source Codes für nen VB2008 Chat nur ich brauche jemanden der mir die richtig in die reihe schreibt
Hier mal die Codes:
Code 1::
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try Dim client As New Net.WebClient client.Credentials = New Net.NetworkCredential("admin", "admin") client.UploadString("ftp://localhost/Raum1.txt", RichTextBox1.Text + RichTextBox2.Text & vbNewLine & vbNewLine) RichTextBox2.Clear() Catch ex As Exception MsgBox("Schreiben fehlgeschlagen! Versuch es nocheinmal!", MsgBoxStyle.Critical, "Fehler") End Try End Sub
Code 2:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Try Dim client As New Net.WebClient client.Credentials = New Net.NetworkCredential("admin", "admin") RichTextBox3.Text = client.DownloadString("ftp://localhost/Raum1.txt") If RichTextBox3.Text = RichTextBox1.Text Then Else RichTextBox1.Text = RichTextBox3.Text End If Catch ex As Exception End Try End Sub