I would just like to thank DigiRev... I downloaded your source and have started fine tuning it for what I am looking for personally. I just want to thank you for being willing to do so much work for no monetary reward. A lot of people wouldn't be willing to do such work. I like the classic version and will continue coding ontop of it.
Question though (for anyone) is it going to be OK to continue programming in Visual Basic 6.0 or is Visual Basic 2008 Express the way to go for free lance programming for personal use?
Thanks Genovah. You're doing exactly what I was hoping most people would do. Use this as a sort of framework to build from and/or learn how to use the Winsock control. That's why I kept it so stripped-down and simple as possible.
As MartinLiss said, you may want to switch over to 2008/.NET. Personally, I've been learning C++ (which is much different) because I don't like .NET at all.
Thanks Genovah. You're doing exactly what I was hoping most people would do. Use this as a sort of framework to build from and/or learn how to use the Winsock control. That's why I kept it so stripped-down and simple as possible.
As MartinLiss said, you may want to switch over to 2008/.NET. Personally, I've been learning C++ (which is much different) because I don't like .NET at all.
I haven't done VB6 since I was in highschool I have mostly been working on Flash projects and things of the sort but after finding this site I have found interest in program coding. I appreciate and lookforward to more projects from you and thank you both for your opinnions on which programs are best. I know very little about C++ but I like the interface of VB so maybe I'll switch over to 2008 in the near future. DigiRev is there a way to contact you personally? I would like to show you my re-vamp of your basic program... I only worked on it for a couple hours so not a whole lot has changed but perhaps with all the requests you have recieved you will have some ideas for me (not code trying to learn that on my own )
Thanks Martin for the welcome! Sorry for not starting a new thread for it.
Sorry for the double post... Here is the compiled version with the changes I have made... If you would like the source just let me know and I can post that to.
Sorry for the double post... Here is the compiled version with the changes I have made... If you would like the source just let me know and I can post that to.
Thanks but the credit goes to DigiRev without his source I would be dazed it has tought me a lot about Winsock and now I will be incorperating it in a lot of new projects
I recieved a PM requesting that I post the source code to the client so here it is!
Note: The source has not changed a WHOLE lot since his there is just a few added features I am still working on the rest and not ready to release it yet.
*edit* Sorry typed up the previous message on a work computer then went to upload it and realized that the source was on my home computer (Doh!) So I logged on remotely and here it is
Last edited by Genovah; May 5th, 2008 at 08:33 PM.
And my newest executeable if anyone is interested... Client only (haven't had enough time to work on the server portion yet still pretty basic.)
Note: Upon closing the program it will write .txt files to "C:\Program Files\ChatterBox\" to save the settings that you have chosen... just so you are aware..
I'm looking for feedback and ideas to add to the project I already have a list wrote down of some of them. Still a work in progress (Digi is so much better at this then I, haha)
That would be just a matter of finding out which socket the member uses and then sck.Close.
For banning you'd get the .RemoteIP from the user before closing and put that in a 'deny connection' list in the Connection_Request event.
Here is my latest I haven't finished everything (no where near going to add a few more features) There are some options in the context menu that are actually not in use yet (Ignore, Global Mute) You will notice under the console I added a 'unban' 'restart server' and 'shutdown server' feature as well as another lstbox with the user names... will finish it up tomorrow and probably work on more features.... let me know what you guys think! Can't wait to see yours digi!
Nice one Genovah. Can you add a PM feature server/client? Great effort dude!
Thank you! I will work on private messaging once I get these other features nailed down.
Currently I am having a problem with m Global Mute feature its not saving/loading properly perhaps someone could shed some light on where I messed up? I might not be able to find it for the fact that I'm extremely tired and maybe it will be easier later but here it is:
ModChat Code:
Option Explicit
'Structure to store info about a user.
'Add your own stuff if you want.
Public Type CHAT_USER
strNickname As String 'Nickname.
strIP As String 'IP address.
strBuffer As String 'Received data buffer from this client.
'Add your own stuff like:
'strRoomName As String 'For multiple rooms.
'strTimeConnected As String 'To store what time they connected?
'All code in the server is based off the info stored here.
End Type
'An array that contains all info about every user.
'A user's index in this array corresponds to the Winsock control responsible for this connection.
Public udtUsers() As CHAT_USER
'Max integer value, therefore, max simultaneous connections.
'(Most computers can't handle anywhere near this many).
Public Const MAX_INT As Integer = 32767
'One main sub that closes the server.
'Should be called before opening the server.
Public Sub CloseServer()
'Steps:
'------
'1. Unload & close all Winsock controls.
'2. Erase udtUsers() array to clear up memory.
Dim intLoop As Integer
With frmChat
.sckServer(0).Close 'Close first control.
If .sckServer.UBound > 0 Then
'More than one Winsock control in the array.
'Loop through and close/unload all of them.
For intLoop = 1 To .sckServer.UBound
.sckServer(intLoop).Close
Unload .sckServer(intLoop)
Next intLoop
End If
End With
'Erase all current users from memory.
Erase udtUsers
End Sub
'Finds an available Winsock control to use for an incoming connection.
'You can just copy/paste this code into your chat program if you want.
'Just change "sckServer" to the name of your Winsock control (array).
'And change MAX_INT to max simultaneous connections that you want (it is at top of this module).
Public Function NextOpenSocket() As Integer
Dim intLoop As Integer, intFound As Integer
With frmChat
'First, see if there is only one Winsock control.
If .sckServer.UBound = 0 Then
'Just load #1.
Load .sckServer(1)
.sckServer(1).Close
NextOpenSocket = 1
Else
'There is more than 1.
'Loop through all of them to find one not being used.
'If it is not being used, it's state will = sckClosed (no connections).
It prevents the user from speaking what so ever by calling upon a sub to check and see if the user has been added to the mute list the problem is in the Mute_Save sub
Below this line of code: If switch = 0 then where muted.txt is input into the string sNextLine
sNextLine = strMuted(l) should put the text into the proper string but I get a subscript error. not sure why seeing as the dimensions are set properly as far as I can tell... but as I said earlier maybe its lack of sleep... off to take a nap
*edit* Fixed... I accidently put an Erase string in by mistake
Last edited by Genovah; May 13th, 2008 at 10:36 PM.
I agree but the coding I have done with databases has all been in PHP/SQL... So my knowledge is limited seeing as I didn't do it too much... However if I were to go to a database setup wouldn't the server have to be running Microsoft SQL or another type of database? I am trying to make a server that can be run by any user with minimal to no set up required... once I scratch the public version and make my own I will definetly learn/convert it to DB format
You can use microsoft access database .mdb files and the querys are the same as if you was using mySQL for the most part so its pretty simple to pick up. If you need an example. i'll post one =)
I once tried to build a chatting system from scratch with databases...
I gave up
But that's quite usually the thing that happens when I start with things from scratch, due to lack of time/patience/coffee and the overflow of laziness/practical problems/the application.
Anyways,
@psych; that interface looks so familiar, but I don't remember where from...
After reviewing the code and looking at everything I think I am going to go with an access database will make it easier to store all the colors and everything else. Thanks psycho! it was a great idea! BTW do you have groove or another type of messanging service? I would like to add you as a friend if you don't mind.
Here are a few spoiler screenshots in case you are wondering what it looks like so far...
I have it setup so you can create different "server configurations" with different room lists and settings and load them right from the Server menu so you don't have to set it up every time.
Makes sense to me! Thats kind of what I was going for but then after implementing an admin feature I figure I would be best off going with a db instead of multiple strings identifying admins vs moderators vs regular clients
Here are a few spoiler screenshots in case you are wondering what it looks like so far...
I have it setup so you can create different "server configurations" with different room lists and settings and load them right from the Server menu so you don't have to set it up every time.
Wow that is pretty cool, how did you get the rounded frames in vb 6?
PS: How did you ever get ti so people could change their username color?
Last edited by Justin M; May 17th, 2008 at 11:40 PM.