🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.visual.misc
Article #508

Re: Tcp/ip sending and receving

#508
From: 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.
Technical Details
Message-ID: <904497460.33.0.nnrp-06.c2de87f2@news.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6sa4r6$9ll$1@news0-alterdial.uu.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1053fc,a061e16bcc375170
X-Google-Attributes: gid1053fc,public
X-Google-Thread: 110e3b,569b12bac26fe45f
X-Google-Attributes: gid110e3b,public
X-Google-Thread: 11629a,a061e16bcc375170
X-Google-Attributes: gid11629a,public
X-Google-Thread: 1212f1,a061e16bcc375170
X-Google-Attributes: gid1212f1,public
X-Google-Thread: 111c14,80fc18620ebe1363
X-Google-Attributes: gid111c14,public
From: "Jason Teagle" <jteagle@earthling.net>
Subject: Re: Tcp/ip sending and receving
Date: 1998/08/30
Message-ID: <904497460.33.0.nnrp-06.c2de87f2@news.demon.co.uk>
X-Deja-AN: 386184907
X-NNTP-Posting-Host: teaglehouse.demon.co.uk:194.222.135.242
References: <6sa4r6$9ll$1@news0-alterdial.uu.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 904497460 nnrp-06:33 NO-IDENT teaglehouse.demon.co.uk:194.222.135.242
Newsgroups: comp.lang.basic.visual.misc,comp.lang.clipper.visual-objects,es.comp.lenguajes.visual-basic,microsoft.public.visualj.debugger,no.it.programmering.visual-basic