🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.basic.visual.misc
2 messages
2 total messages Started by bernie Sat, 29 Aug 1998 00:00
Tcp/ip sending and receving
#509
Author: bernie
Date: Sat, 29 Aug 1998 00:00
18 lines
1393 bytes
how do i setup my program so that i can send multiple strings and recivew
them and send them to there know strings.

EX>
i use this to send a string to a richtextbox on another program:

Private Sub wskClient_DataArrival(ByVal bytesTotal As Long)
    Dim strData As String

    wskClient.GetData strData
    rtbScreen.Text =  strData

End Sub

i want to be able to have another string that will send only the user name.
i need all the help you can give. thank you

eather post on news group or sedn to deforest@mkl.com
Re: Tcp/ip sending and receving
#508
Author: Jason Teagle
Date: Sun, 30 Aug 1998 00:00
64 lines
2831 bytes
bernie wrote in message <6sa4r6$9ll$1@news0-alterdial.uu.net>...
>how do i setup my program so that i can send multiple strings and recivew
>them and send them to there know strings.
>
>EX>
>i use this to send a string to a richtextbox on another program:
>
>Private Sub wskClient_DataArrival(ByVal bytesTotal As Long)
>    Dim strData As String
>
>    wskClient.GetData strData
>    rtbScreen.Text =  strData
>
>End Sub
>
>i want to be able to have another string that will send only the user name.
>i need all the help you can give. thank you
>
>eather post on news group or sedn to deforest@mkl.com
>
>
>
>
>

You could send a message of the form

    [txtHello]Hello[txtGoodbye]Goodbye

where each piece of text ("Hello", "Goodbye") is preceded by a name in
square brackets ([]). This name is the actual name of a control on the
receiving form, so you could then use

---
sub SetControlText(strControlName as string, strText as string)
    dim iCount as integer, n as integer
    dim FormControl as Control

    iCount = frmReceiving.Controls.Count
    for n = 0 to iCount - 1
        FormControl = frmReceiving.Control(n)
        if (TypeOf  FormControl is TextBox) then
            if (FormControl.Name = strControlName) then FormControl.Text =
strText
        end if
    next
end sub
---

to assign the text to the correct control. If you want to use square
brackets in your actual pieces of text, you could use Chr$(0) as the
separator between control names and text items.

Does this help?


_ _
o o     Jason Teagle
 <
 v      jteagle@solartron.com

 Please respond via e-mail if you want to catch
 my attention - I don't always read newsgroups.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads