1 Adet Textbox
2 Adet RichTextBox
2 Adet Button
Programda Textbox 'a Nick yazılıyor
Butonların iri Gönder diğeri yenile isterseniz timer'a bağlayın otomatik olsun.
Rich textbox'UN biri mesaj yazma diğeri gelen mesajları görüntüleme.
Kod ALıntıdır.
2 Adet RichTextBox
2 Adet Button
Programda Textbox 'a Nick yazılıyor
Butonların iri Gönder diğeri yenile isterseniz timer'a bağlayın otomatik olsun.
Rich textbox'UN biri mesaj yazma diğeri gelen mesajları görüntüleme.
Kod:
[COLOR="Yellow"]Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim name As String
name = TextBox1.Text
Try
Dim client As New Net.WebClient
client.Credentials = New Net.NetworkCredential("FTPUSERNAME", "FTPŞİFRE")
client.UploadString("ftp://ftp.siteadi.com/chat.txt", RichTextBox1.Text & name & " : " & RichTextBox2.Text + vbNewLine)
Catch ex As Exception
MsgBox("Sunucu Hatası")
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Form2.Hide()
Try
Dim client As New Net.WebClient
client.Credentials = New Net.NetworkCredential("ftpusername", "ftpşifre")
RichTextBox1.Text = client.DownloadString("ftp://ftp.siteadı.com/chat.txt")
Catch ex As Exception
MsgBox("Sunucu Hatası")
End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
RichTextBox2.Text = ""
Try
Dim client As New Net.WebClient
client.Credentials = New Net.NetworkCredential("ftpusername", "ftpşifre")
RichTextBox1.Text = client.DownloadString("ftp://ftp.siteadı.com/chat.txt")
Catch ex As Exception
MsgBox("Sunucu Hatası")
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
MsgBox("Program oleeeeeey tarafından yapılmıştır.")
End Sub
End Class[/COLOR]

