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

📄 frmmessage.frm

📁 计算机网络与通信的知识
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmMessage 
   Caption         =   "ICQ信息"
   ClientHeight    =   7245
   ClientLeft      =   2250
   ClientTop       =   720
   ClientWidth     =   7680
   Icon            =   "frmMessage.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   483
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   512
   Begin VB.CommandButton cmdExit 
      Caption         =   "关    闭"
      Height          =   375
      Left            =   6240
      TabIndex        =   16
      Top             =   3840
      Width           =   1335
   End
   Begin VB.CommandButton cmdModRecv 
      Caption         =   "接收模式"
      Height          =   375
      Left            =   1920
      TabIndex        =   15
      Top             =   3840
      Width           =   1335
   End
   Begin VB.CommandButton cmdModChat 
      Caption         =   "对话模式"
      Height          =   375
      Left            =   4800
      TabIndex        =   14
      Top             =   3840
      Width           =   1335
   End
   Begin VB.CommandButton cmdModSend 
      Caption         =   "发送模式"
      Height          =   375
      Left            =   3360
      TabIndex        =   13
      Top             =   3840
      Width           =   1335
   End
   Begin VB.Frame famSend 
      Caption         =   "发送信息(回车键也可发送)"
      ForeColor       =   &H00C000C0&
      Height          =   2655
      Left            =   120
      TabIndex        =   6
      Top             =   4440
      Width           =   7455
      Begin VB.CommandButton cmdSend 
         Caption         =   "发送"
         Height          =   375
         Left            =   6000
         TabIndex        =   12
         Top             =   240
         Width           =   1215
      End
      Begin VB.TextBox txtSend 
         BackColor       =   &H00808000&
         ForeColor       =   &H00FFFF00&
         Height          =   1815
         Left            =   120
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   11
         Top             =   720
         Width           =   7215
      End
      Begin VB.Label labSendAccount 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Height          =   300
         Left            =   4440
         TabIndex        =   10
         Top             =   300
         Width           =   1215
      End
      Begin VB.Label Label5 
         Caption         =   "帐号"
         Height          =   255
         Left            =   4080
         TabIndex        =   9
         Top             =   360
         Width           =   495
      End
      Begin VB.Label labSendName 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Height          =   300
         Left            =   2160
         TabIndex        =   8
         Top             =   300
         Width           =   1335
      End
      Begin VB.Label Label2 
         Caption         =   "信息发送给      呢称"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   360
         Width           =   1815
      End
   End
   Begin VB.Frame famRecv 
      Caption         =   "接收信息"
      ForeColor       =   &H00C00000&
      Height          =   3615
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7455
      Begin VB.TextBox txtRecv 
         BackColor       =   &H00800000&
         ForeColor       =   &H0000FFFF&
         Height          =   2775
         Left            =   120
         Locked          =   -1  'True
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   1
         Top             =   720
         Width           =   7215
      End
      Begin VB.Label labRecvAccount 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Height          =   300
         Left            =   4560
         TabIndex        =   5
         Top             =   300
         Width           =   1215
      End
      Begin VB.Label Label3 
         Caption         =   "帐号"
         Height          =   255
         Left            =   4200
         TabIndex        =   4
         Top             =   360
         Width           =   375
      End
      Begin VB.Label labRecvName 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Height          =   300
         Left            =   2040
         TabIndex        =   3
         Top             =   300
         Width           =   1455
      End
      Begin VB.Label Label1 
         Caption         =   "信息来自       呢称 "
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   360
         Width           =   1815
      End
   End
End
Attribute VB_Name = "frmMessage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdExit_Click()
Unload Me
End Sub

'======================
'对话模式
'======================
Private Sub cmdModChat_Click()
intDispMsgFlag = 3
SelectDispMode True, 296, True, 8, 256, 7650
End Sub
'======================
'接收模式
'======================
Private Sub cmdModRecv_Click()
intDispMsgFlag = 2
SelectDispMode False, 296, True, 8, 256, 4700
End Sub

'======================
'发送模式
'======================
Private Sub cmdModSend_Click()
intDispMsgFlag = 1
SelectDispMode True, 8, False, 248, 190, 3700
End Sub
'=====================
'选择显示模式
'=====================
Private Sub SelectDispMode(ByVal blnFamSendV As Boolean, _
                           ByVal intSendTop As Integer, _
                           ByVal blnFamRecvV As Boolean, _
                           ByVal intRecvTop As Integer, _
                           ByVal intCmdTop As Integer, _
                           ByVal intFormHeight As Integer)
famSend.Visible = blnFamSendV
famSend.Top = intSendTop
famRecv.Visible = blnFamRecvV
famRecv.Top = intRecvTop
cmdModSend.Top = intCmdTop
cmdModChat.Top = intCmdTop
cmdModRecv.Top = intCmdTop
cmdExit.Top = intCmdTop
Me.Height = intFormHeight
End Sub
'=======================
' 发送信息
'=======================
Private Sub cmdSend_Click()
Dim strTp As String
strTp = txtSend.Text
On Error GoTo WSKCLIENT_ERR
frmLogin.wskClient.SendData "1" + strCommandDiv + _
                            ClientSend + strCommandDiv + _
                            strTp + strCommandDiv + _
                            labSendAccount.Caption
txtSend.Text = ""
txtSend.SelStart = 1
txtSend.SetFocus
Exit Sub
WSKCLIENT_ERR:
 wskClientErr
End Sub

'======================
'载入窗体
'======================
Private Sub Form_Load()
DispForm
blnRecvMsgFrmLoad = True
End Sub


'======================
'卸载窗体
'======================
Private Sub Form_Unload(Cancel As Integer)
blnRecvMsgFrmLoad = False
End Sub

'======================================
' 发送验证,检查用户输入是否有非法字符
'=====================================
Private Sub txtSend_KeyPress(KeyAscii As Integer)
Dim strTp As String
strTp = Chr(KeyAscii)
    '发送字符中不许出现发送命令分隔符和返回命令分隔符
If strTp = strCommandDiv Or strTp = CmdResultDiv Or _
   strTp = strFdDivRst Or strTp = strFdRd Then
    MsgBox "非法的字符!本系统不允许发送:" + strTp, 16, "ICQ系统"
    KeyAscii = 0  '取消击键
End If
    '回车发送
If KeyAscii = 13 Then
    KeyAscii = 0
    cmdSend_Click
End If
End Sub
'======================
'显示窗体(公共过程,frmMain要调用)
'======================
Public Sub DispForm()
labSendAccount.Caption = strSendAccount
labSendName.Caption = strSendName
txtSend.Text = ""
Select Case intDispMsgFlag
    Case 1
        cmdModSend_Click
    Case 2
        cmdModRecv_Click
    Case 3
        cmdModChat_Click
End Select
End Sub

⌨️ 快捷键说明

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