🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.program
Article #58

���һ��vb������

#58
From: ·����
Date: Thu, 14 Oct 1999 00:00
58 lines
2228 bytes
������vb��д��һ���򵥵Ķ����������
    1:  �ͻ�n�Ļ����������  
    2:  ���������ܵ��Ժ�,��ÿ���ͻ�����һ��
    3:  ��ÿ���ͻ�����ʾ
  ���ǵ����з�����һ������
    �����ڷ�������ÿ���ͻ����͹����,ֻ������͵ĵĿͻ�
������ʾ,����ı���Ҫ�ȵ�������ר�ŷ��͵�ʱ��Ű���ǰ����
Ϣȫ��ʾ����????(����������̨�����ϵ��Թ�)
    ���븽��: 

Dim nsock As Integer
Dim thissock As Integer
Dim word(9) As String

Private Sub Command1_Click()
Winsock1(thissock).SendData Str(0) + ":" + Text1.Text
End Sub

Private Sub Form_Load()
nsock = 0
Winsock1(0).LocalPort = 1001
Winsock1(0).Listen
Label1.Caption = "��������ʼ����"
End Sub

Private Sub Winsock1_Close(Index As Integer)
Label1.Caption = "�ͻ��ر�" + Str(Index)
Winsock1(Index).Close
End Sub

Private Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As Long)
nsock = nsock + 1
Load Winsock1(nsock)
Winsock1(nsock).Accept (requestID)
Label1.Caption = "�����" + Str(nsock)
End Sub

Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim recei As String
Dim i As Integer
thissock = Index
Winsock1(Index).GetData recei
Text2.Text = Str(Index) + ":" + recei
For i = 1 To nsock Step 1
sendhehe i
Next i
End Sub
Private Sub sendhehe(i As Integer)
If i = thissock Then
    GoTo 1
 
End If
    Winsock1(i).SendData Text2.Text
1 End Sub
  

--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Technical Details
Message-ID: <991014.11bc8v$PBBS@bbs.ustc.edu.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: fc86e,550a20831f746e1f,start
X-Google-Attributes: gidfc86e,public
From: Jqlong_J@bbs.ustc.edu.cn (·����)
Subject: ���һ��vb������
Date: 1999/10/14
Message-ID: <991014.11bc8v$PBBS@bbs.ustc.edu.cn>
X-Deja-AN: 536564793
Distribution: ustc
Organization: �й�ƴ�BBSվ
Newsgroups: cn.bbs.comp.program