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

📄 frmmsglist.frm

📁 自动化测试程序
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmMsgList 
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   3090
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   12030
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   3090
   ScaleWidth      =   12030
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command3 
      Caption         =   "清除SOE"
      Height          =   315
      Left            =   7620
      TabIndex        =   7
      Top             =   2160
      Width           =   855
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   675
      Left            =   4260
      TabIndex        =   6
      Top             =   600
      Width           =   2235
      _ExtentX        =   3942
      _ExtentY        =   1191
      LabelWrap       =   0   'False
      HideSelection   =   0   'False
      AllowReorder    =   -1  'True
      FlatScrollBar   =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   0
   End
   Begin VB.CommandButton Command2 
      Caption         =   "保存报文"
      Height          =   315
      Left            =   6420
      TabIndex        =   5
      Top             =   2160
      Width           =   1035
   End
   Begin VB.CommandButton Command1 
      Caption         =   "暂停报文"
      Height          =   315
      Left            =   5100
      TabIndex        =   4
      Top             =   2160
      Width           =   1035
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H008080FF&
      Height          =   375
      Index           =   2
      Left            =   3240
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   3
      Top             =   840
      Width           =   615
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H80000002&
      ForeColor       =   &H000000FF&
      Height          =   375
      Index           =   1
      Left            =   1080
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   2
      Top             =   1080
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      ForeColor       =   &H80000001&
      Height          =   375
      Index           =   0
      Left            =   1080
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      Top             =   600
      Width           =   1695
   End
   Begin MSComctlLib.TabStrip TabStrip1 
      Height          =   2055
      Left            =   960
      TabIndex        =   0
      Top             =   360
      Width           =   6255
      _ExtentX        =   11033
      _ExtentY        =   3625
      MultiRow        =   -1  'True
      Placement       =   1
      _Version        =   393216
      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
         NumTabs         =   5
         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "通讯报文"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "临时信息"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "其他"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "SOE"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab5 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "事件记录"
            ImageVarType    =   2
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmMsgList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
If BaoWen_Refresh Then
    BaoWen_Refresh = False
    Command1.Caption = "刷新报文"
Else
    BaoWen_Refresh = True
    Command1.Caption = "暂停报文"
End If
End Sub

Private Sub Command2_Click()
Open App.Path & "\baowen.txt" For Append As #1
Print #1, Me.Text1(0).Text
Close #1
End Sub

Private Sub Command3_Click()
Me.ListView1.ListItems.Clear
End Sub

Private Sub Form_Load()
MsgListWidth = fMainForm.ScaleWidth - TreeWidth
MsgListHeight = 2500

frmMsgList.Width = MsgListWidth
frmMsgList.Height = MsgListHeight

frmMsgList.Left = TreeWidth
frmMsgList.Top = fMainForm.ScaleHeight - MsgListHeight

SOE_numble = 0
'With Text1(1)
'                     .Text = " 序号 | 遥信点号 |      变      位      时      间     | 状态||"
'    .Text = .Text & vbCrLf & " 001  |    000   |  2005年03月15日23时54分32秒999毫秒  |  1  ||"
'
'End With

Dim col As ColumnHeader
With ListView1
    .MultiSelect = True
    .HideColumnHeaders = False
    .View = lvwReport
    .GridLines = True

    Set col = .ColumnHeaders.Add(, , "序号", 700)
    Set col = .ColumnHeaders.Add(, , "装置地址", 1150)
    Set col = .ColumnHeaders.Add(, , "装置类型", 1150)
    Set col = .ColumnHeaders.Add(, , "遥信点号", 1150)
    Set col = .ColumnHeaders.Add(, , "遥信名称", 3000)
    Set col = .ColumnHeaders.Add(, , "变位时间", 4200)
    Set col = .ColumnHeaders.Add(, , "状态", 700)
End With

End Sub

Private Sub SetTab()

End Sub

Private Sub Form_Resize()
With TabStrip1
    .Left = 50
    .Top = 50
    .Width = frmMsgList.ScaleWidth - .Left * 2
    .Height = frmMsgList.ScaleHeight - .Top * 2
End With

Dim i As Integer
For i = 0 To 2
    With Text1(i)
    .Left = 100
    .Top = 100
    .Width = frmMsgList.ScaleWidth - .Left * 2
    .Height = frmMsgList.ScaleHeight - .Top * 2 - 400
    
    End With
Next i
Me.ListView1.Left = 100
Me.ListView1.Top = 100
Me.ListView1.Width = frmMsgList.ScaleWidth - Me.ListView1.Left * 2
Me.ListView1.Height = frmMsgList.ScaleHeight - Me.ListView1.Top * 2 - 400

Text1(0).ZOrder 0

End Sub


Private Sub TabStrip1_Click()
Select Case TabStrip1.SelectedItem.Index
    Case 1
        Text1(0).ZOrder 0
    Case 2
        Text1(1).ZOrder 0
    Case 3
        Text1(2).ZOrder 0
    Case 4
        Me.ListView1.ZOrder 0
End Select
End Sub

Private Sub Text1_Change(Index As Integer)
If Index = 1 Then
With frmMsgList.Text1(1)
    .SelStart = Len(.Text)
    .SelLength = 0
End With
End If

End Sub

⌨️ 快捷键说明

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