Make your own FTP Chat

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
33 posts Page 1 of 4
User avatar
RunarM
Hardcore Programmer
Hardcore Programmer
Posts: 508
Joined: Wed Nov 18, 2009 11:33 pm

Make your own FTP Chat
RunarM
This tutorial is on how to make a FTP chat.
-viewtopic.php?f=35&t=1912

What you will need:
*2 Forms [Start and Main]

Main:
*1 Textbox
*1 Button
*2 RichTextboxes
*1 Timer
Untitled.png
Start:
*1 Textbox
*1 Button

-----------------------------

Start: Textbox1 Code:
Your username have to be more then 3 letters =)
Code: Select all
If TextBox1.TextLength = 3 Then
            Button1.Enabled = True
        End If
Start: Button1 Code:
-This will hide the form and show the main form
Code: Select all
 Me.Hide()
       Main.Show()


MAIN: Button1:
Code: Select all
        Dim name As String
        name = TextBox1.Text
        Try
            Dim client As New Net.WebClient
            client.Credentials = New Net.NetworkCredential("FTP USERNAME", "FTP PASSWORD")
            client.UploadString("ftp://YOURWEBSITE.com/chat.txt", "[" & TimeOfDay & "] " & Start.TextBox1.Text & ": " & TextBox1.Text & vbNewLine & RichTextBox2.Text & vbNewLine)
            RichTextBox2.Clear()
        Catch ex As Exception
            MsgBox("Error, this error is being taken care of.", MsgBoxStyle.Critical, "Error!")
        End Try
        Try
            Dim client As New Net.WebClient
            client.Credentials = New Net.NetworkCredential("FTP USERNAME", "FTP PASSWORD")
            RichTextBox2.Text = client.DownloadString("ftp://YOURWEBSITE.com/chat.txt")
            If RichTextBox2.Text = RichTextBox1.Text Then  Else  : RichTextBox1.Text = RichTextBox2.Text

        Catch ex As Exception
        End Try
        TextBox1.Text = ""
MAIN Timer1 code:
Code: Select all
        Try
            Dim client As New Net.WebClient
            client.Credentials = New Net.NetworkCredential("FTP USERNAME", "FTP PASSWORD")
            RichTextBox2.Text = client.DownloadString("ftp://YOURWEBSITE.com/chat.txt")
            If RichTextBox2.Text = RichTextBox1.Text Then  Else  : RichTextBox1.Text = RichTextBox2.Text
        Catch ex As Exception
        End Try
    End Sub
Timer Interval: 5000
Timer Enabled = True

You have to edit the places with 'FTP USERNAME', 'FTP PASSWORD' and 'YOURWEBSITE.com'

Hope you understood the tutorial.

RunarM
Source: http://www.runarmolund.com/WRONG.zip
You do not have the required permissions to view the files attached to this post.
Last edited by RunarM on Sun May 16, 2010 2:05 am, edited 1 time in total.
Just another day in my life.
http://www.codexvideos.com
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

Re: Make your own FTP Chat
Martin
thanks
Image
User avatar
RunarM
Hardcore Programmer
Hardcore Programmer
Posts: 508
Joined: Wed Nov 18, 2009 11:33 pm

Re: Make your own FTP Chat
RunarM
How to get FTP Server for free:

1. Go to this website:http://www.000webhost.com/order.php
2. Fill out the form
1.png
3. Browse down till you see this:
2.png
Congratulation, now you have a FTP Server thingy =)
Just another day in my life.
http://www.codexvideos.com
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: Make your own FTP Chat
zachman61
i made a video for this and put on here a few months ago
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
RunarM
Hardcore Programmer
Hardcore Programmer
Posts: 508
Joined: Wed Nov 18, 2009 11:33 pm

Re: Make your own FTP Chat
RunarM
If you look at the top of the tutorial there is a link to your thread.. Easier as a tutorial =)
Just another day in my life.
http://www.codexvideos.com
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: Make your own FTP Chat
zachman61
very sorry to sound mean if i did
i typed link in wrong lol i deleted the 2 at the end
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
RunarM
Hardcore Programmer
Hardcore Programmer
Posts: 508
Joined: Wed Nov 18, 2009 11:33 pm

Re: Make your own FTP Chat
RunarM
You didn't sound mean :O
Just another day in my life.
http://www.codexvideos.com
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: Make your own FTP Chat
zachman61
it now works on vista/7
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
RunarM
Hardcore Programmer
Hardcore Programmer
Posts: 508
Joined: Wed Nov 18, 2009 11:33 pm

Re: Make your own FTP Chat
RunarM
I've edited some stuff =)

So you don't have to click button1 all the time:
Code: Select all
   Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
        If e.KeyCode = Keys.Enter Then
            Button1.PerformClick()
        End If
    End Sub
Just another day in my life.
http://www.codexvideos.com
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

Re: Make your own FTP Chat
zachman61
i used accept button instead
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
33 posts Page 1 of 4
Return to “Tutorials”