⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 呵呵,简单的VB的做的聊天程序
💻 FRM
字号:
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form Form1 
   Caption         =   "飞天亿聊"
   ClientHeight    =   5925
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   9525
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5925
   ScaleWidth      =   9525
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   1440
      TabIndex        =   6
      Top             =   4320
      Visible         =   0   'False
      Width           =   5775
   End
   Begin VB.ListBox List2 
      Height          =   3300
      Left            =   480
      TabIndex        =   4
      Top             =   600
      Visible         =   0   'False
      Width           =   6735
   End
   Begin VB.Frame Frame1 
      Height          =   3735
      Left            =   240
      TabIndex        =   3
      Top             =   360
      Visible         =   0   'False
      Width           =   7215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   6240
      TabIndex        =   2
      Top             =   5040
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.ListBox List1 
      Height          =   2940
      Left            =   7800
      TabIndex        =   0
      Top             =   960
      Visible         =   0   'False
      Width           =   1335
   End
   Begin MSWinsockLib.Winsock Winsock1 
      Left            =   8640
      Top             =   4800
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
      Protocol        =   1
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Caption         =   "我说:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   5
      Top             =   4440
      Visible         =   0   'False
      Width           =   1095
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "在线:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   7560
      TabIndex        =   1
      Top             =   360
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.Menu option 
      Caption         =   "设置"
      Begin VB.Menu op 
         Caption         =   "选项"
      End
      Begin VB.Menu tt 
         Caption         =   "-"
      End
      Begin VB.Menu out 
         Caption         =   "退出"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Winsock1.SendData Form2.Text3 & "说:" & Text1.Text
If Text1.Text <> Empty Then
List2.AddItem Form2.Text3.Text & "说:" & Text1.Text
Text1.Text = Empty
End If

End Sub

Private Sub op_Click()
Form2.Show
End Sub

Private Sub out_Click()
Unload Form1
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim tt As String
Winsock1.GetData tt
List2.AddItem tt
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -