Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by ·����
Thu, 14 Oct 1999 00:00
���һ��vb������
Author: ·����
Date: Thu, 14 Oct 1999 00:00
Date: Thu, 14 Oct 1999 00:00
58 lines
2228 bytes
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]
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