VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Make your own chat room in 10 minutes

Chaz  (1 Submission)   Internet/HTML   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

Ever want your own chat? Ever want your own rules? This code allows you to make your own chat room! Allows 2 people to chat from anywhere in the world from any internet provider! Perfect for quick and private communication!
NOTE: This program requires mswinsck.ocx

Assumes
There are alot of things to set up in order for this code to work correctly. Here are the complete list of things you will need to do: 1. Add the mswinsck.ocx to your project 2. Create a textbox and name it txtHost This will be the box where the remote host is entered 3. Create a textbox and name it txtLocalP. This will be the box where the local port is entered 4. Create a textbox and name it txtRemoteP This will be the box where the remote port is entered 5. Create a textbox and name it txtNick This will be the box you will enter your nickname (aka screenname) 6. Create a textbox and name it txtSend This will be the box you type in to send stuff to the chatroom 7. Create a large textbox and name it txtMain This will be the chatroom 8. Make txtMain multiline and also add vertical scrollbars 9. Create a command button and name it cmdC. Give it the caption "Connect" 10. Create a command button and name it cmdD. Give it the caption "Disconnect" 11. Create a command button and name it cmdSend. Give it the caption "Send". This will be the button that sends the text in txtSend to the chatroom. 12. Put a winsock control on the form and name it sckSend 13. Labels can be put so you can remember which text box is which. Also, it would be best to erase all the text in the text boxes (ie: Get rid of Text1 written in the box) When 2 people have the program running, this is how you connect: 1. First, enter a nickname in the txtNick box. This is the name that will come before what you say in the chatroom. 2. In the txtHost textbox, you must put the other person's IP address or hostname. 3. You and the other person must both think up any number to be your local port (Just make sure they're different numbers. ie: My local port is 1000, my friend's local port is 2000) 4. After you've both made up your local host and entered it in the txtLocalP textbox, you must next enter the other person's local port in your txtRemoteP textbox. For example, My local port is 1000. and my remote port is 2000... My friend's local port would be 2000 and my friends's remote port would be 1000. 5. Both of you must now click the connect button. 7. Now just type text in the txtSend textbox and click the "Send" button. You will notice the text moved into the chatroom. This text is visible by both people! Congratulations!

API Declarations

Rate Make your own chat room in 10 minutes (1(1 Vote))
Make your own chat room in 10 minutes.bas

Make your own chat room in 10 minutes Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters