Results 1 to 29 of 29

Thread: [RESOLVED] Winsock: sending content of combobox from server to client

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Resolved [RESOLVED] Winsock: sending content of combobox from server to client

    Hey everyone. I'm new to this forum and I need some help with Winsock. Well theres a combobox on my client and a combobox on the server. Lets say the combobox on the server was filled. How can i send the same exact content of the server combobox to the combobox on my client ?? Thx in advance

  2. #2
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    Hey everyone. I'm new to this forum and I need some help with Winsock. Well theres a combobox on my client and a combobox on the server. Lets say the combobox on the server was filled. How can i send the same exact content of the server combobox to the combobox on my client ?? Thx in advance
    You could do this:

    VB Code:
    1. Private Sub Command1_Click()
    2. 'put each item into an arr$, the delimiter (seperator) is ||||, on the client
    3.  Dim arr As String, i As Integer
    4.    'put all the data into an array string, we will seperate this once recieved at client
    5.   For i% = 0 To cboServer.ListCount - 1
    6.     If Len(arr$) = 0 Then
    7.        arr$ = cboServer.ListCount & "||||" & cboServer.List(i%)
    8.           Else
    9.        arr$ = arr$ & "||||" & cboServer.List(i%)
    10.     End If
    11.   Next i%
    12.      sckServer.SendData arr$ 'send the data to the client
    13. End Sub

    VB Code:
    1. Private Sub sckClient_DataArrival(ByVal bytesTotal As Long)
    2.   Dim str As String, tmp() As String, i As Integer
    3.     'put the data recieved into str$
    4.       sckClient.GetData str$, vbString
    5.  
    6.      'seperate each with Split()
    7.         tmp$() = Split(str$, "||||")
    8.          
    9.            'tmp$(0) is the ListCount
    10.  
    11.                For i% = 1 to CInt(tmp$(0))
    12.                  cboClient.AddItem tmp$(i%)
    13.                Next i%
    14. End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Winsock: sending content of combobox from server to client

    What if the content isnt always the same. It changes according to some input. Btw, what if im not friends with arrays ?

  4. #4
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    What if the content isnt always the same. It changes according to some input. Btw, what if im not friends with arrays ?

    If your not good with arrays i'm sure there is tutorials around, but there is other ways like:

    VB Code:
    1. Private Sub Command1_Click()
    2.  Dim i As Integer
    3.       'send each item one by one, this will take longer if you have a very long list,
    4.       'and you should probably use arrays.
    5.    For i% = 0 to cboServer.ListCount - 1
    6.     sckServer.SendData cboServer.List(i%)
    7.    Next i%
    8. End Sub

    VB Code:
    1. Private Sub sckClient_DataArrival(ByVal bytesTotal As Long)
    2.  Dim str As String
    3.           'get the data sent by server
    4.        sckClient.GetData str$, vbString
    5.          'add the item to the client combo
    6.      cboClient.AddItem str$  
    7.  
    8. End Sub

    I don't get what you mean what if the content changes? can you explain more?

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Winsock: sending content of combobox from server to client

    Well I probably need to read some more tuts, though i read about arrays and understood them. I just think that they're hard to use when things get complicated, which is why i never bothered reading again. Any advice ? Btw, what does the % stand for ?

  6. #6
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    Well I probably need to read some more tuts, though i read about arrays and understood them. I just think that they're hard to use when things get complicated, which is why i never bothered reading again. Any advice ? Btw, what does the % stand for ?
    They just help you read code easier and so you can tell what that variable is. Like:

    String: $
    Long: &
    Integer: %

    You don't need them, but I suggest you use them if you have a very long function or just for anything.

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Winsock: sending content of combobox from server to client

    Hey i got to understand arrays now but what i was saying is that maybe my combo1.Listcount kept on changing........let me think of an example. Lets say im inserting the online contacts of my msn, they're not always constant you know so the listcount will change. I cant use like Number(1 to Combo1.listcount) can I ? Btw, i got it all except the ending, when u split them (confusing) and CInt...

  8. #8
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    Hey i got to understand arrays now but what i was saying is that maybe my combo1.Listcount kept on changing........let me think of an example. Lets say im inserting the online contacts of my msn, they're not always constant you know so the listcount will change. I cant use like Number(1 to Combo1.listcount) can I ? Btw, i got it all except the ending, when u split them (confusing) and CInt...
    Yes you can use this method, but you can only update the list when the user isn't looking at it (there is probably another method than this, but you can try this):

    VB Code:
    1. Private Sub cboClient_DropDown()
    2.  'stop the timer from updating until we lose focus
    3.    Timer1.Enabled = False 'timer1 is how we are updating are list, you don't have to use a timer, but you can
    4. End Sub
    5.  
    6. Private Sub cboClient_LostFocus()
    7.  'start the timer again
    8.   Timer1.Enabled = True
    9. End Sub

    CInt(expression) is used to convert an expression (in this case a string) into an integer.
    Split(expression,delimiter,limit,compare) is used to split a string into pieces everytime it hits the delimiter. If you want more information on this look-it-up in MSDN, or type it in your code-window then right-click on it and find "definition" and click it.

    So if you had:

    VB Code:
    1. Dim str As String, tmp() As String
    2. str$ = "Welcome to VBForums"

    We want to get each word by itself, and as you can see each word is seperated with a space.

    VB Code:
    1. tmp$() = Split(str$," ") 'we don't need to use limit, or compare these are optional
    2. 'we would then end up with tmp$(0 to 2)
    3. 'tmp$(0) would be "Welcome"
    4. 'tmp$(1) would be "to"
    5. 'tmp$(2) would be "VBForums"

  9. #9

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Winsock: sending content of combobox from server to client

    Got error "Subscript out of range" at the level of: For i = 1 to CInt(tmp(0))

  10. #10
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    Got error "Subscript out of range" at the level of: For i = 1 to CInt(tmp(0))
    ops, I forgot to fix that try:

    VB Code:
    1. For i% = 1 to CInt(tmp$(0)) - 1

  11. #11

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Winsock: sending content of combobox from server to client

    Hey it worked ! Thx a lot man But i seem to have a problem...what if i want to receive more data on the client? like the .Getdata function will get messed up. You see it only worked when i removed all the other Data im receiving... what's the solution ? How can i separate one data from the other ?
    Last edited by Karimz; Aug 3rd, 2006 at 05:54 PM.

  12. #12
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    Hey it worked ! Thx a lot man But i seem to have a problem...what if i want to receive more data on the client? like the .Getdata function will get messed up. You see it only worked when i removed all the other Data im receiving... what's the solution ? How can i separate one data from the other ?
    Yes I usually do this by sending a command with it , for example:

    VB Code:
    1. Private Sub Command1_Click()
    2. 'put each item into an arr$, the delimiter (seperator) is ||||, on the client
    3.  Dim arr As String, i As Integer
    4.    'put all the data into an array string, we will seperate this once recieved at client
    5.   For i% = 0 To cboServer.ListCount - 1
    6.     If Len(arr$) = 0 Then
    7.        arr$ = cboServer.ListCount & "||||" & cboServer.List(i%)
    8.           Else
    9.        arr$ = arr$ & "||||" & cboServer.List(i%)
    10.     End If
    11.   Next i%
    12.      sckServer.SendData arr$ 'send the data to the client
    13. End Sub
    14.  
    15. Private Sub sckClient_DataArrival(ByVal bytesTotal As Long)
    16.   Dim str As String
    17.  
    18.     'put the data recieved into str$
    19.       sckClient.GetData str$, vbString
    20.  
    21.     'evaluate the data recieved from the client
    22.       EvaluateData& str$
    23.  
    24. End Sub
    25.  
    26. Function EvaluateData(ByVal dataRecieved As String) As Long
    27.  
    28.  Dim tmp() As String, i As Integer
    29.     'the actual data is after the first 6 characters, for example:
    30.     'LISTU=the rest of the data recieved, LISTU stands for LIST UPDATE
    31.    'dataCommand is the command sent by the client, like LISTU,
    32.    'realData is the data after the dataCommand, the actual data we want.
    33.  
    34.       Dim dataCommand As String, realData As String
    35.       dataCommand$ = Right$(dataRecieved$, Len(dataRecieved$) - 6)
    36.       realData$ = Left$(dataRecieved, Len(dataRecieved$) - Len(dataRecieved$) + 6)
    37.          Select Case dataCommand$
    38.             Case "LISTU="
    39.               'seperate each with Split()
    40.                    tmp$() = Split(str$, "||||")
    41.                   'tmp$(0) is the ListCount
    42.                      For i% = 1 to CInt(tmp$(0)) - 1
    43.                        cboClient.AddItem tmp$(i%)
    44.                      Next i%
    45.          End Select
    46.  
    47. End Function

    You can add more commands, but they must be six characters long like "LISTU=", after the six characters is the data you want. You can then add a another case and do whatever you want with the data.
    Last edited by XRsTX; Aug 3rd, 2006 at 06:53 PM.

  13. #13

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Winsock: sending content of combobox from server to client

    Umm i think i would understand if u ADD to that last post a Case where you send a message from the server and receive it through msgbox in client for instance....very much appreciated.

  14. #14
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    Umm i think i would understand if u ADD to that last post a Case where you send a message from the server and receive it through msgbox in client for instance....very much appreciated.
    VB Code:
    1. Private Sub Command1_Click()
    2. 'put each item into an arr$, the delimiter (seperator) is ||||, on the client
    3.  Dim arr As String, i As Integer
    4.    'put all the data into an array string, we will seperate this once recieved at client
    5.   For i% = 0 To cboServer.ListCount - 1
    6.     If Len(arr$) = 0 Then
    7.        arr$ = cboServer.ListCount & "||||" & cboServer.List(i%)
    8.           Else
    9.        arr$ = arr$ & "||||" & cboServer.List(i%)
    10.     End If
    11.   Next i%
    12.      sckServer.SendData arr$ 'send the data to the client
    13. End Sub
    14.  
    15. Private Sub sckClient_DataArrival(ByVal bytesTotal As Long)
    16.   Dim str As String
    17.  
    18.     'put the data recieved into str$
    19.       sckClient.GetData str$, vbString
    20.  
    21.     'evaluate the data recieved from the client
    22.       EvaluateData& str$
    23.  
    24. End Sub
    25.  
    26. Function EvaluateData(ByVal dataRecieved As String) As Long
    27.  
    28.  Dim tmp() As String, i As Integer
    29.     'the actual data is after the first 6 characters, for example:
    30.     'LISTU=the rest of the data recieved, LISTU stands for LIST UPDATE
    31.    'dataCommand is the command sent by the client, like LISTU,
    32.    'realData is the data after the dataCommand, the actual data we want.
    33.  
    34.       Dim dataCommand As String, realData As String
    35.       dataCommand$ = Right$(dataRecieved$, Len(dataRecieved$) - 6)
    36.       realData$ = Left$(dataRecieved, Len(dataRecieved$) - Len(dataRecieved$) + 6)
    37.          Select Case dataCommand$
    38.             Case "LISTU="
    39.               'seperate each with Split()
    40.                    tmp$() = Split(realData$, "||||")
    41.                   'tmp$(0) is the ListCount
    42.                      For i% = 1 to CInt(tmp$(0)) - 1
    43.                        cboClient.AddItem tmp$(i%)
    44.                      Next i%
    45.              Case "MSGBX="
    46.                MsgBox realData$, vbOkOnly + vbSystemModal, "My Project"
    47.          End Select
    48.  
    49. End Function

    Sorry, and I made an error in the splitting I fixed that, forgot to change the variable, and to call this msgbox you can do this:

    VB Code:
    1. sckClient.SendData "MSGBX=Hello, Welcome to my project!"

  15. #15

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Winsock: sending content of combobox from server to client

    Ummm if i want it like to send whats in a text box? like txtbox = txtmsg.Text
    Winsock.Senddata txtbox
    Btw, you didnt include LISTU= in the data being sent.
    Last edited by Karimz; Aug 3rd, 2006 at 07:46 PM.

  16. #16
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    how does it know that the LISTU= case is the one for the combobox thingy while the MSGBX= is for the msgbox ?
    VB Code:
    1. dataCommand$ = Left$(dataRecieved, Len(dataRecieved$) - Len(dataRecieved$) + 6)
    2.       realData$ = Right$(dataRecieved$, Len(dataRecieved$) - 6)

    This is the part where we seperate the data we want, from the command that seperates each case. Like if our data was:

    "MSGBX=Hello"

    dataCommand$ deletes the actual data and leaves just the Command.
    realData$ deletes the command, btu leaves the data we want to display.

    Now that this is done we can put them into cases and give them each stuff to do. This is how it knows what to do, you can add more cases if you want.

    Sorry, and I made another mistake, this should work:

    VB Code:
    1. Private Sub Command1_Click()
    2. 'put each item into an arr$, the delimiter (seperator) is ||||, on the client
    3.  Dim arr As String, i As Integer
    4.    'put all the data into an array string, we will seperate this once recieved at client
    5.   For i% = 0 To cboServer.ListCount - 1
    6.     If Len(arr$) = 0 Then
    7.        arr$ = cboServer.ListCount & "||||" & cboServer.List(i%)
    8.           Else
    9.        arr$ = arr$ & "||||" & cboServer.List(i%)
    10.     End If
    11.   Next i%
    12.      sckServer.SendData arr$ 'send the data to the client
    13. End Sub
    14.  
    15. Private Sub sckClient_DataArrival(ByVal bytesTotal As Long)
    16.   Dim str As String
    17.  
    18.     'put the data recieved into str$
    19.       sckClient.GetData str$, vbString
    20.  
    21.     'evaluate the data recieved from the client
    22.       EvaluateData& str$
    23.  
    24. End Sub
    25.  
    26. Function EvaluateData(ByVal dataRecieved As String) As Long
    27.  
    28.  Dim tmp() As String, i As Integer
    29.     'the actual data is after the first 6 characters, for example:
    30.     'LISTU=the rest of the data recieved, LISTU stands for LIST UPDATE
    31.    'dataCommand is the command sent by the client, like LISTU,
    32.    'realData is the data after the dataCommand, the actual data we want.
    33.  
    34.       Dim dataCommand As String, realData As String
    35.       dataCommand$ = Left$(dataRecieved, Len(dataRecieved$) - Len(dataRecieved$) + 6)
    36.       realData$ = Right$(dataRecieved$, Len(dataRecieved$) - 6)
    37.          Select Case dataCommand$
    38.             Case "LISTU="
    39.               'seperate each with Split()
    40.                    tmp$() = Split(realData$, "||||")
    41.                   'tmp$(0) is the ListCount
    42.                      For i% = 1 to CInt(tmp$(0)) - 1
    43.                        cboClient.AddItem tmp$(i%)
    44.                      Next i%
    45.              Case "MSGBX="
    46.                MsgBox realData$, vbOkOnly + vbSystemModal, "My Project"
    47.          End Select
    48.  
    49. End Function

  17. #17

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Winsock: sending content of combobox from server to client

    Im sorry, you posted before i edited the post.

    Ummm if i want it like to send whats in a text box? like txtbox = txtmsg.Text
    Winsock.Senddata txtbox
    Btw, you didnt include LISTU= in the data being sent.

  18. #18
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    Im sorry, you posted before i edited the post.

    Ummm if i want it like to send whats in a text box? like txtbox = txtmsg.Text
    Winsock.Senddata txtbox
    Btw, you didnt include LISTU= in the data being sent.
    VB Code:
    1. Dim Msg As String
    2.   Msg$ = txtmsg.Text
    3.    Winsock1.SendData Msg$

    Yes just like that, and what do you mean I didn't add "LISTU=" in the data being sent?

  19. #19

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Winsock: sending content of combobox from server to client

    Well wouldnt it be like Winsock.Senddata LISTU=arr$ or something ?
    And about that Senddata Msg$ how do i interpret it ? Whats the datacommand and all ? this is what confuses me.... like when sending strings or sending a real msg " "

  20. #20
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Winsock: sending content of combobox from server to client

    Quote Originally Posted by Karimz
    Well wouldnt it be like Winsock.Senddata LISTU=arr$ or something ?
    And about that Senddata Msg$ how do i interpret it ? Whats the datacommand and all ? this is what confuses me.... like when sending strings or sending a real msg " "
    To send the command "LISTU=" you first need to get all the items from the ComboBox, you can do this like this:

    VB Code:
    1. Function SetupLISTU(ByRef combo As Object) As String
    2.  Static i As Integer, arr As String
    3.    For i% = 0 to combo.ListCount - 1
    4.     If Len(arr$) = 0 Then
    5.        arr$ = combo.ListCount & "||||" & combo.List(i%)
    6.           Else
    7.        arr$ = arr$ & "||||" & combo.List(i%)
    8.     End If
    9.    Next i%
    10.      SetupLISTU$ = "LISTU=" & arr$
    11. End Function
    12.  
    13. Private Sub cmdUpdateList_Click() 'update the list
    14.  sckServer.SendData SetupLISTU$(cboServer)
    15. End Sub
    16.  
    17. 'to send a message
    18.  
    19. Private Sub cmdMessage_Click() 'send message
    20.   sckServer.SendData "MSGBX=Hello"
    21. End Sub

  21. #21

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: [RESOLVED] Winsock: sending content of combobox from server to client

    Hey heres what im trying to do now: i have 3 combo boxes on the server, and im trying to send each combobox's data to be received by one treeview on the client, where the content of combobox1 has 1 image, that of combobox2 has its own image, and that of combobox3 has its own image in that treeview on the client. Heres what i have done, but the problem is that the treeview is facing problems....data is successfully being sent to client but the data is wrongly being interpreted.
    VB Code:
    1. Private Sub Command1_Click()
    2. Dim arr(0 To 2) As String, i As Integer, j As Integer, onlinearr As String, awayarr As String, busyarr As String
    3.  
    4. For j% = 0 To 2
    5.  
    6.         For i% = 0 To Combo1(j).ListCount - 1
    7.             If Len(arr(j)) = 0 Then
    8.                 arr(j) = Combo1(j).ListCount & "||||" & Combo1(j).List(i%)
    9.             Else
    10.                 arr(j) = arr(j) & "||||" & Combo1(j).List(i%)
    11.             End If
    12.         Next i%
    13.  
    14. Next j%
    15. onlinearr$ = "Onlin=" & arr$(0)
    16. awayarr$ = "Away1=" & arr$(1)
    17. busyarr$ = "Busy1=" & arr$(2)
    18.  
    19. If Combo1(0).ListCount > 0 Then sckserver.SendData onlinearr$
    20. If Combo1(1).ListCount > 0 Then sckserver.SendData awayarr$
    21. If Combo1(2).ListCount > 0 Then sckserver.SendData busyarr$
    22.  
    23.  
    24.  
    25. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    26. Winsock1.GetData Data
    27. EvaluateData Data
    28.  
    29.  
    30. Function EvaluateData(ByVal dataRecieved As String) As Long
    31.  
    32.  Dim tmp() As String, i As Integer, bu() As String, k As Integer, aw() As String, j As Integer
    33.  
    34.       Dim dataCommand As String, realData As String
    35.       dataCommand$ = Left$(dataRecieved, 6)
    36.       realData$ = Right$(dataRecieved$, Len(dataRecieved$) - 6)
    37.      
    38.          Select Case dataCommand$
    39.          
    40.             Case "Onlin="
    41.            
    42.                 tmp$() = Split(realData$, "||||")
    43.  
    44.                     For i% = 1 To CInt(tmp$(0))
    45.                         Formcontact.TreeView1.Nodes.Add , , , tmp$(i%), "Online"
    46.                     Next i%
    47.                    
    48.             Case "Away1="
    49.  
    50.                 aw$() = Split(realData$, "||||")
    51.  
    52.                     For j% = 1 To CInt(aw$(0))
    53.                         Formcontact.TreeView1.Nodes.Add , , , aw$(j%), "Away"
    54.                     Next j%
    55.                
    56.             Case "Busy1="
    57.            
    58.                 bu$() = Split(realData$, "||||")
    59.  
    60.                     For k = 1 To CInt(bu$(0))
    61.                         Formcontact.TreeView1.Nodes.Add , , , bu$(k%), "Busy"
    62.                     Next k
    63.                    
    64.          End Select
    65.  
    66. End Function

    What i get is the content of combobox1(0).... but near the last item in the list i see Away1=4

  22. #22
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: [RESOLVED] Winsock: sending content of combobox from server to client

    @XRsTX - why are you bothering with the DropDown handle? I think that the Validate handle should do the job. It triggers every time Combo receives a new item:

    VB Code:
    1. Private Sub Combo1_Validate(Cancel As Boolean)
    2.     'your code
    3. End Sub

  23. #23

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: [RESOLVED] Winsock: sending content of combobox from server to client

    Hey gavio, if u continued reading the thread, i decided to use a treeview instead of a combobox. Besides, i think a clear button should do a good job, i just clear the list and update it again using a Get List button for example. Btw, did you check the last post for me, im having trouble now again I appreciate any help provided.

  24. #24
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: [RESOLVED] Winsock: sending content of combobox from server to client

    What is causing the problem? Case "Away1="?

  25. #25

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: [RESOLVED] Winsock: sending content of combobox from server to client

    Well only case "Onlin=" is working, the other cases arent working. I even tried deleting Case "Online=" (but didnt delete the other 2 cases) but the treeview remained empty then. Before deleting Case "Online=", lets say the last item on the list was "Joe", i saw instead "JoeAway1=4" or something like that, it even appears sometimes on another item not necessarily the last one. "Busy1=" isnt working either.

  26. #26
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: [RESOLVED] Winsock: sending content of combobox from server to client

    Well... put this between those two lines (to see exactly the data you are receiving):

    VB Code:
    1. Winsock1.GetData Data
    2.     [B]MsgBox Data[/B]
    3. EvaluateData Data
    Data is a string, right?

  27. #27

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: [RESOLVED] Winsock: sending content of combobox from server to client

    Yea its a string. Well all the data i see in the msgbox is correct, but it looks like its all in one block, the 3 contents are attached to each other, its like its all one case...maybe its because im sending the 3 data at the same time ?
    Last edited by Karimz; Aug 13th, 2006 at 05:02 PM.

  28. #28
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: [RESOLVED] Winsock: sending content of combobox from server to client

    That's the reason (proboball) why your code didn't work. You'll have to split those 3in1 contents to 3 separate strings. Something is wrong in the code where you send your data... Just a hint: everytime something doesn't work, and you can't figure it out, put MsgBox between each line and you'll probobally find out the problem.

    edit: I don't think so. Each instruction executes individually.

  29. #29

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: [RESOLVED] Winsock: sending content of combobox from server to client

    Well thx, i'll try my best Was thinking of using timers...i'll see if i can figure it out on my own, thx a lot again.

    Edit: So should i work at the end where the data is being sent or the end where its being received ?
    Last edited by Karimz; Aug 13th, 2006 at 05:23 PM.

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