Page 3 of 6 FirstFirst 123456 LastLast
Results 81 to 120 of 215

Thread: [VB6] - Multi-User Chat Example (Winsock)

  1. #81

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Quote Originally Posted by Genovah
    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.

  2. #82
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Quote Originally Posted by DigiRev
    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.

  3. #83
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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.
    Attached Files Attached Files
    -- Josh Smith
    C#, VB, PHP, SQL

  4. #84

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Quote Originally Posted by Genovah
    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.
    Nice, looks cool.

  5. #85
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Thanks can't wait to see yours
    -- Josh Smith
    C#, VB, PHP, SQL

  6. #86
    Junior Member
    Join Date
    Mar 2008
    Posts
    31

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Genovah yours looks cool.

  7. #87
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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
    -- Josh Smith
    C#, VB, PHP, SQL

  8. #88
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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
    Attached Files Attached Files
    Last edited by Genovah; May 5th, 2008 at 08:33 PM.
    -- Josh Smith
    C#, VB, PHP, SQL

  9. #89
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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)

    Take care all.
    Attached Files Attached Files
    -- Josh Smith
    C#, VB, PHP, SQL

  10. #90
    Hyperactive Member Philly0494's Avatar
    Join Date
    Apr 2008
    Posts
    485

    Re: [VB6] - Multi-User Chat Example (Winsock)

    I made some changes, this has more options as well as a great logging system


    Features:
    Code:
    Client:
    Leave Room
    Reconnect
    Style Changes
    Features - Run, Kill, Calc, Temp
    
    Server:
    Announce
    Disconnect Clients
    Style Changes
    Save Chat
    View Logs
    Clear Logs
    Features - Run, Kill, Calc, Temp
    When you close the server, the logs are updated, so you don't need to press Save Chat everytime

    If anyone wants the source code just look below.
    Attached Files Attached Files
    Last edited by Philly0494; May 10th, 2008 at 11:50 PM.

  11. #91
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Do you know if there is a way to ban or disconnect troublesome members?

  12. #92
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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.
    Delete it. They just clutter threads anyway.

  13. #93

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Exactly what TheBigB said. I'll add it into the server real quick since this update is taking a little longer than I thought.

    Will post back soon.

  14. #94

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Ok, this should work. I wrote it really quickly but it should not let them into the room once they are banned.

    On the server, right-click the user list to ban a user.

    The client also wasn't closing properly so that should be fixed also.
    Attached Files Attached Files

  15. #95
    Hyperactive Member Philly0494's Avatar
    Join Date
    Apr 2008
    Posts
    485

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Quote Originally Posted by DigiRev
    Ok, this should work. I wrote it really quickly but it should not let them into the room once they are banned.

    On the server, right-click the user list to ban a user.

    The client also wasn't closing properly so that should be fixed also.
    yeah i also fixed the client problem

    and i just added a block user function that works both client and server sided, it ignores the user, not disconnects him.

    so that will be up soon

  16. #96
    Hyperactive Member Philly0494's Avatar
    Join Date
    Apr 2008
    Posts
    485

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Here it is

    Code:
    Client:
    Leave Room
    Reconnect
    Style Changes
    *Block User*
    
    Server:
    Announce
    Disconnect Clients
    Style Changes
    Save Chat
    View Logs
    Clear Logs
    *Block User*
    *Lock User*
    I got rid of those other, unnecessary features.

    you can only block 1 person at a time, same with locking
    just right-click a user in the listbox

    Blocking: you dont hear the selected person
    Locking: nobody hears the selected person

    I'll add anything else you guys want me to
    Attached Files Attached Files

  17. #97
    Junior Member
    Join Date
    Mar 2008
    Posts
    31

    Re: [VB6] - Multi-User Chat Example (Winsock)

    you both have great working models. digirev i can't wait to see your final version.

  18. #98

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Quote Originally Posted by minidesigner
    you both have great working models. digirev i can't wait to see your final version.
    Almost done.

    Will be a huge improvement over the first one.

  19. #99
    Hyperactive Member Philly0494's Avatar
    Join Date
    Apr 2008
    Posts
    485

    Re: [VB6] - Multi-User Chat Example (Winsock)

    are you going to put my chat logging system in you new release?

  20. #100

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Quote Originally Posted by Philly0494
    are you going to put my chat logging system in you new release?
    Yeah I liked your logging feature so I'll put that in there also.

    If anyone has any more ideas, now is the time to let me know. It's getting pretty close to being done.

  21. #101
    Hyperactive Member Philly0494's Avatar
    Join Date
    Apr 2008
    Posts
    485

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Code:
    Client:
    Leave Room
    Reconnect
    Style Changes
    Block User
    *Block User Management (Max 3)*
    
    Server:
    Announce
    Disconnect Clients
    Style Changes
    Save Chat
    View Logs
    Clear Logs
    Block User
    Lock User
    *Block User Management (Max 3)*
    *Lock User Management (Max 3)*
    you guys can take this, but im not gonna bother making any more since digirev will do a much better job when he finishes his
    Attached Files Attached Files

  22. #102
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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!
    Attached Files Attached Files
    -- Josh Smith
    C#, VB, PHP, SQL

  23. #103
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Nice one Genovah. Can you add a PM feature server/client? Great effort dude!

  24. #104
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Quote Originally Posted by zynder
    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:
    1. Option Explicit
    2.  
    3. 'Structure to store info about a user.
    4. 'Add your own stuff if you want.
    5. Public Type CHAT_USER
    6.     strNickname As String 'Nickname.
    7.     strIP As String 'IP address.
    8.     strBuffer As String 'Received data buffer from this client.
    9.     'Add your own stuff like:
    10.     'strRoomName As String 'For multiple rooms.
    11.     'strTimeConnected As String 'To store what time they connected?
    12.     'All code in the server is based off the info stored here.
    13. End Type
    14.  
    15. 'An array that contains all info about every user.
    16. 'A user's index in this array corresponds to the Winsock control responsible for this connection.
    17. Public udtUsers() As CHAT_USER
    18.  
    19. 'Max integer value, therefore, max simultaneous connections.
    20. '(Most computers can't handle anywhere near this many).
    21. Public Const MAX_INT As Integer = 32767
    22.  
    23. 'One main sub that closes the server.
    24. 'Should be called before opening the server.
    25. Public Sub CloseServer()
    26.     'Steps:
    27.     '------
    28.     '1. Unload & close all Winsock controls.
    29.     '2. Erase udtUsers() array to clear up memory.
    30.    
    31.     Dim intLoop As Integer
    32.    
    33.     With frmChat
    34.         .sckServer(0).Close 'Close first control.
    35.        
    36.         If .sckServer.UBound > 0 Then
    37.             'More than one Winsock control in the array.
    38.             'Loop through and close/unload all of them.
    39.             For intLoop = 1 To .sckServer.UBound
    40.                 .sckServer(intLoop).Close
    41.                 Unload .sckServer(intLoop)
    42.             Next intLoop
    43.         End If
    44.    
    45.     End With
    46.    
    47.     'Erase all current users from memory.
    48.     Erase udtUsers
    49. End Sub
    50.  
    51. 'Finds an available Winsock control to use for an incoming connection.
    52. 'You can just copy/paste this code into your chat program if you want.
    53. 'Just change "sckServer" to the name of your Winsock control (array).
    54. 'And change MAX_INT to max simultaneous connections that you want (it is at top of this module).
    55. Public Function NextOpenSocket() As Integer
    56.     Dim intLoop As Integer, intFound As Integer
    57.    
    58.     With frmChat
    59.         'First, see if there is only one Winsock control.
    60.         If .sckServer.UBound = 0 Then
    61.             'Just load #1.
    62.             Load .sckServer(1)
    63.             .sckServer(1).Close
    64.             NextOpenSocket = 1
    65.         Else
    66.             'There is more than 1.
    67.             'Loop through all of them to find one not being used.
    68.             'If it is not being used, it's state will = sckClosed (no connections).
    69.             For intLoop = 1 To .sckServer.UBound
    70.                 If .sckServer(intLoop).State = sckClosed Then
    71.                     'Found one not being used.
    72.                     intFound = intLoop
    73.                     Exit For
    74.                 End If
    75.             Next intLoop
    76.            
    77.             'Check if we found one.
    78.             If intFound > 0 Then
    79.                 NextOpenSocket = intFound
    80.             Else
    81.                 'Didn't find one.
    82.                 'Load a new one.
    83.                 'Unless we reached MAX_INT
    84.                 'which is max number of clients.
    85.                 If .sckServer.UBound + 1 < MAX_INT Then
    86.                     'There is room for another one.
    87.                     intFound = .sckServer.UBound + 1
    88.                     Load .sckServer(intFound)
    89.                     .sckServer(intFound).Close
    90.                     NextOpenSocket = intFound
    91.                 Else
    92.                     'Server is full!
    93.                     Debug.Print "CONNECTION REJECTED! MAX CLIENTS (" & MAX_INT & ") REACHED!"
    94.                 End If
    95.            
    96.             End If
    97.         End If
    98.     End With
    99.    
    100. End Function
    101.  
    102. 'Returns the upper bounds (UBound) of udtUsers array without an error.
    103. Public Function UBUsers() As Long
    104.     On Error GoTo ErrorHandler
    105.    
    106.     UBUsers = UBound(udtUsers)
    107.    
    108.     Exit Function
    109.    
    110. ErrorHandler:
    111.    
    112. End Function
    113.  
    114. 'ignore a user.
    115. Public Sub GlobalMuteUser(ByRef Username As String, Switch As Integer)
    116.     Dim l As Long, u As Long
    117.     Dim s As String, strPacket As String
    118.     Dim r As Long
    119.    ' On Error GoTo ErrorHandler
    120.     If Username = "" Then Exit Sub
    121.     s = LCase$(Username)
    122.     u = UBUsers
    123.     If Switch = 1 Then
    124.         For l = 0 To u
    125.             If LCase$(udtUsers(l).strNickname) = s Then
    126.                 GlobalMute_Add udtUsers(l).strIP
    127.                 Mute_Save udtUsers(l).strIP, 1
    128.                 r = l
    129.                 Exit For
    130.             End If
    131.         Next l
    132.             AddStatusMessage frmChat.rtbChat, RGB(128, 0, 0), Username & " was muted."
    133.     Else
    134.         For l = 0 To u
    135.             If LCase$(udtUsers(l).strNickname) = s Then
    136.                 GlobalMute_Add udtUsers(1).strIP
    137.                 Mute_Save udtUsers(l).strIP, 0
    138.                 r = l
    139.                 Exit For
    140.             End If
    141.         Next l
    142.             AddStatusMessage frmChat.rtbChat, RGB(128, 0, 0), Username & " was un-muted."
    143.     End If
    144. ErrorHandler:
    145. End Sub
    146.  
    147. Public Sub KickUser(ByRef Username As String)
    148.     Dim l As Long, u As Long
    149.     Dim s As String, strPacket As String
    150.     Dim r As Long
    151.     On Error GoTo ErrorHandler
    152.     If Username = "" Then Exit Sub
    153.     s = LCase$(Username)
    154.     u = UBUsers
    155.     For l = 0 To u
    156.         If LCase$(udtUsers(l).strNickname) = s Then
    157.             strPacket = "KIK" & Chr$(2) & udtUsers(1).strNickname & Chr$(4)
    158.             r = l
    159.         End If
    160.     Next l
    161.    
    162.     If Len(strPacket) > 0 Then
    163.         SendGlobalData strPacket
    164.         frmChat.sckServer_Close CInt(r)
    165.     AddStatusMessage frmChat.rtbChat, RGB(128, 0, 0), Username & " was kicked."
    166.     End If
    167. ErrorHandler:
    168. End Sub

    ModServer Code:
    1. Option Explicit
    2. Public strMuted() As String
    3. Public bolRestart As Boolean
    4.  
    5. Public Sub Mute_Save(ByRef IPAddress As String, Switch As Integer)
    6.     Dim intFF As Integer, l As Long, u As Long
    7.     Dim sNextLine As String
    8.     intFF = FreeFile
    9. 'On Error Resume Next
    10. 'Kill App.Path & "\muted.txt"
    11. 'On Error GoTo ErrorHandler
    12.    If Switch = 1 Then
    13.          u = Mute_Ubound
    14.          If u > -1 Then
    15.              Open App.Path & "\muted.txt" For Append As #intFF
    16.                  For l = 0 To u
    17.                      If Len(strMuted(l)) > 0 Then
    18.                          If l < u Then
    19.                              Print #intFF, strMuted(l)
    20.                          Else
    21.                              Print #intFF, strMuted(l);
    22.                          End If
    23.                      End If
    24.                  Next l
    25.              Close #intFF
    26.          End If
    27.          Exit Sub
    28.     ElseIf Switch = 0 Then
    29.         u = Mute_Ubound
    30.         ReDim Preserve strMuted(0 To u)
    31.         If u > -1 Then
    32.             Open App.Path & "\muted.txt" For Input As #intFF
    33.                 Erase strMuted
    34.                 Do Until EOF(intFF)
    35.                     Line Input #intFF, sNextLine
    36.                     If Not sNextLine = "" Then
    37.                         If Not sNextLine = IPAddress Then
    38.                             strMuted(l) = sNextLine
    39.                         Else
    40.                             strMuted(l) = vbNullString
    41.                         End If
    42.                     End If
    43.                     l = l + 1
    44.                 Loop
    45.             Close #intFF
    46.             Open App.Path & "\muted.txt" For Output As #intFF
    47.                 Print #intFF, vbNullString
    48.             Close #intFF
    49.             Open App.Path & "\muted.txt" For Append As #intFF
    50.                  For l = 0 To u
    51.                      If Len(strMuted(l)) > 0 Then
    52.                          If l < u Then
    53.                              If Not IPAddress = strMuted(l) Then Print #intFF, strMuted(l)
    54.                          Else
    55.                              If Not IPAddress = strMuted(l) Then Print #intFF, strMuted(l)
    56.                          End If
    57.                      End If
    58.                  Next l
    59.              Close #intFF
    60.         End If
    61.     End If
    62. ErrorHandler:
    63.     Close #intFF
    64.     Exit Sub
    65. End Sub
    66.  
    67. Public Sub Mute_Load()
    68.     Dim intFF As Integer
    69.     intFF = FreeFile
    70.    
    71.     Erase strMuted
    72.     On Error GoTo ErrorHandler
    73.     Open App.Path & "\muted.txt" For Input As #intFF
    74.         If LOF(intFF) > 0 Then strMuted = Split(Input(LOF(intFF), intFF), vbCrLf)
    75.     Close #intFF
    76.     Exit Sub
    77. ErrorHandler:
    78.     Close #intFF
    79.     Exit Sub
    80. End Sub
    81.  
    82. Public Sub GlobalMute_Add(ByRef IPAddress As String)
    83.     Dim u As Long
    84.     u = Mute_Ubound + 1
    85.     ReDim Preserve strMuted(0 To u) As String
    86.     strMuted(u) = IPAddress
    87. End Sub
    88.  
    89. Public Function GlobalMute_IsMuted(ByRef IPAddress As String) As Boolean
    90.     Dim l As Long, u As Long
    91.     u = Mute_Ubound
    92.     If u > -1 Then
    93.         For l = 0 To u
    94.             If strMuted(l) = IPAddress Then
    95.                 GlobalMute_IsMuted = True
    96.                 Exit For
    97.             End If
    98.         Next l
    99.     End If
    100. End Function
    101.  
    102. Public Function Mute_Ubound() As Long
    103.     On Error GoTo ErrorHandler
    104.     Mute_Ubound = UBound(strMuted)
    105.     Exit Function
    106. ErrorHandler:
    107.     Mute_Ubound = -1
    108.     Exit Function
    109. End Function
    I am having problems in the Muted_Save portion of the code. The code is truncated so it could fit. Thanks for any help in advance!
    Attached Files Attached Files
    -- Josh Smith
    C#, VB, PHP, SQL

  25. #105
    Junior Member
    Join Date
    Mar 2008
    Posts
    31

    Re: [VB6] - Multi-User Chat Example (Winsock)

    first off explain what mute is to be used for

  26. #106
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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.
    -- Josh Smith
    C#, VB, PHP, SQL

  27. #107
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Genovah, you should really convert to a database instead of usng text files. it reduces code by a lot =)

  28. #108
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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
    -- Josh Smith
    C#, VB, PHP, SQL

  29. #109
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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 =)

  30. #110
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    As long as you don't mind I would be interested in seeing an example
    -- Josh Smith
    C#, VB, PHP, SQL

  31. #111
    Fanatic Member
    Join Date
    Aug 2003
    Posts
    601

    Re: [VB6] - Multi-User Chat Example (Winsock)

    http://www.vbforums.com/showthread.php?p=3228114 MULTI-USER WINSOCK CHAT USING ACCESS DATABASE

  32. #112
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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...
    Delete it. They just clutter threads anyway.

  33. #113
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Quote Originally Posted by psychotomus
    http://www.vbforums.com/showthread.php?p=3228114 MULTI-USER WINSOCK CHAT USING ACCESS DATABASE
    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.
    -- Josh Smith
    C#, VB, PHP, SQL

  34. #114
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    DB not installed yet but PM feature is complete
    Note: ignore is not fully functional on the client side yet
    Attached Files Attached Files
    -- Josh Smith
    C#, VB, PHP, SQL

  35. #115

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Smile Spoilers

    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.
    Attached Images Attached Images      

  36. #116
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    Wow Digi and I thought I was getting somewhere.... *bows to DigiRev*

    Good job can't wait to start parsing your code! :P

    Are you using a db format or standard .txt files with VB Chat?
    -- Josh Smith
    C#, VB, PHP, SQL

  37. #117

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [VB6] - Multi-User Chat Example (Winsock)

    I wanted this to be kind of like mIRC without people having to sign up so there is no db or anything.

    Maybe after I release this one I'll make an IM version...

    Will post more screenshots soon. File transfers are being a *****

  38. #118
    Member
    Join Date
    May 2008
    Location
    Moorhead, MN
    Posts
    37

    Re: [VB6] - Multi-User Chat Example (Winsock)

    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
    -- Josh Smith
    C#, VB, PHP, SQL

  39. #119
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: Spoilers

    Quote Originally Posted by DigiRev
    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.

  40. #120

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Spoilers

    Quote Originally Posted by Justin M
    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?
    Those are normal frames. I'm just using a manifest file for XP style.

    I sent the color along with the nickname when they login. And store this color in the CLIENT UDT on the server side.

    When the server relays a chat message to the room, it also sends this color from that user's UDT.

    Then I updated the procedure that shows a chat message to set the color of the username to this value.

    Sorry, that's the best I can explain it. This thing should be done pretty soon and you can see.

Page 3 of 6 FirstFirst 123456 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width