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

📄 frmmain.frm

📁 计算机网络与通信的知识
💻 FRM
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
Begin VB.Form frmMain 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "ICQ系统"
   ClientHeight    =   6210
   ClientLeft      =   5175
   ClientTop       =   855
   ClientWidth     =   2055
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6210
   ScaleWidth      =   2055
   Begin VB.CommandButton cmdExit 
      Caption         =   "退出ICQ系统"
      Height          =   375
      Left            =   120
      TabIndex        =   4
      Top             =   5760
      Width           =   1815
   End
   Begin VB.CommandButton cmdPwd 
      Caption         =   "修改本人密码"
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   5280
      Width           =   1815
   End
   Begin VB.CommandButton cmdOnlineUser 
      Caption         =   "在线用户查看"
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Top             =   4800
      Width           =   1815
   End
   Begin ComctlLib.ListView ListView1 
      Height          =   3855
      Left            =   120
      TabIndex        =   0
      Top             =   840
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   6800
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      _Version        =   327680
      ForeColor       =   -2147483640
      BackColor       =   16777088
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   0
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "左键双击发送信息鼠标右键查看属性"
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   350
      TabIndex        =   1
      Top             =   240
      Width           =   1455
   End
   Begin VB.Shape Shape1 
      BorderColor     =   &H00E0E0E0&
      FillColor       =   &H00FF8080&
      FillStyle       =   0  'Solid
      Height          =   615
      Left            =   0
      Top             =   120
      Width           =   2055
   End
   Begin ComctlLib.ImageList ImageList1 
      Left            =   1560
      Top             =   4440
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   327680
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   18
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":08CA
            Key             =   "n1"
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":0BE4
            Key             =   "n2"
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":0EFE
            Key             =   "n3"
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":1218
            Key             =   "n4"
         EndProperty
         BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":1532
            Key             =   "n5"
         EndProperty
         BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":184C
            Key             =   "n6"
         EndProperty
         BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":1B66
            Key             =   "n7"
         EndProperty
         BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":1E80
            Key             =   "n8"
         EndProperty
         BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":219A
            Key             =   "n9"
         EndProperty
         BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":24B4
            Key             =   "v1"
         EndProperty
         BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":27CE
            Key             =   "v2"
         EndProperty
         BeginProperty ListImage12 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":2AE8
            Key             =   "v3"
         EndProperty
         BeginProperty ListImage13 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":2E02
            Key             =   "v4"
         EndProperty
         BeginProperty ListImage14 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":311C
            Key             =   "v5"
         EndProperty
         BeginProperty ListImage15 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":3436
            Key             =   "v6"
         EndProperty
         BeginProperty ListImage16 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":3750
            Key             =   "v7"
         EndProperty
         BeginProperty ListImage17 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":3A6A
            Key             =   "v8"
         EndProperty
         BeginProperty ListImage18 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "frmMain.frx":3D84
            Key             =   "v9"
         EndProperty
      EndProperty
   End
   Begin VB.Menu mnuBuddy 
      Caption         =   "buddy"
      Visible         =   0   'False
      Begin VB.Menu mnuPrivateMessage 
         Caption         =   "查看好友详细信息"
      End
      Begin VB.Menu aaa 
         Caption         =   "-"
      End
      Begin VB.Menu mnuDelBuddy 
         Caption         =   "从好友列表中删除"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim blnMouseRightKey As Boolean

Private Sub cmdExit_Click()
Unload Me
End Sub

Private Sub cmdPwd_Click()
frmPwd.Show 1, Me
End Sub

'================================
' 在线用户查看
'================================
Private Sub cmdOnlineUser_Click()
On Error GoTo WSKCLIENT_ERR
frmLogin.wskClient.SendData "1" + strCommandDiv + _
                            ClientOnlineUser + strCommandDiv + _
                            "0" + strCommandDiv + "0"
    
Exit Sub
WSKCLIENT_ERR:
    wskClientErr
End Sub

'===========================================
'  窗体激活,因为frmMessage窗体是无模式窗体,
' 此处用于控制,使得必须先关闭frmMessage窗体才能即活frmMain窗体
'===========================================
Private Sub Form_Activate()
If blnRecvMsgFrmLoad Then frmMessage.SetFocus
End Sub
'================================
' 卸载窗体
'================================
Private Sub Form_Unload(Cancel As Integer)
Unload frmLogin
End Sub


'================================
' 打开信息发送窗体
'================================
Private Sub ListView1_DblClick()
Dim intTp As Integer
intTp = Val(Mid(ListView1.SelectedItem.Key, 4))
strSendAccount = arrayBuddy(intTp).strAccount
strSendName = arrayBuddy(intTp).strName
If blnRecvMsgFrmLoad Then
    If intDispMsgFlag = 2 Then intDispMsgFlag = 3
    frmMessage.DispForm
Else
    intDispMsgFlag = 1
    frmMessage.Show
End If
End Sub


'================================
' 鼠标右键单击好友列表,弹出属性菜单
'================================
Private Sub ListView1_ItemClick(ByVal Item As ComctlLib.ListItem)
If blnMouseRightKey Then PopupMenu mnuBuddy
End Sub

'========================
' 截获鼠标右键
'========================
Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
blnMouseRightKey = False
If Button = 2 Then blnMouseRightKey = True
End Sub
'=======================
'  载入窗体
'=======================
Private Sub Form_Load()
Dim c As ColumnHeader

Me.Caption = Me.Caption + " " + strLoginAccount
mnuBuddy.Visible = False
ListView1.View = lvwReport
ListView1.SmallIcons = ImageList1
ListView1.HideColumnHeaders = False
ListView1.LabelEdit = lvwManual
Set c = ListView1.ColumnHeaders.Add()
c.Text = "  我的好友(0)"
InitBuddyList ListView1
End Sub
'===========================
' 从好友列表中删除
'===========================
Private Sub mnuDelBuddy_Click()
Dim intTp As Integer
Dim m

intTp = Val(Mid(ListView1.SelectedItem.Key, 4))
m = MsgBox("确定删除 " + arrayBuddy(intTp).strName + " 吗?(Y/N)", 36, "ICQ客户")
If m = vbNo Then Exit Sub
DeleteBuddy arrayBuddy(intTp).strAccount
ListView1.ListItems.Clear
InitBuddyList ListView1
End Sub

'===========================
' 查看好友的详细信息
'===========================
Private Sub mnuPrivateMessage_Click()
Dim intTp As Integer
intTp = Val(Mid(ListView1.SelectedItem.Key, 4))
With arrayBuddy(intTp)
    MsgBox "帐号: " + .strAccount + vbCr + _
           "呢称: " + .strName + vbCr + _
           "性别: " + .strSex + vbCr + _
           "爱好: " + .strFancy, 48, "ICQ客户"
End With
End Sub


⌨️ 快捷键说明

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