funcfiletake.frm

来自「电梯检测系统是对电梯性能进行检测的系统。是一个用来学习的程序。」· FRM 代码 · 共 191 行

FRM
191
字号
VERSION 5.00
Begin VB.Form FuncFileTake 
   BorderStyle     =   5  'Sizable ToolWindow
   Caption         =   "Open Trip File"
   ClientHeight    =   2805
   ClientLeft      =   60
   ClientTop       =   285
   ClientWidth     =   4860
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   12
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2805
   ScaleWidth      =   4860
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton CancelCmd 
      Caption         =   "Cancel"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2520
      TabIndex        =   5
      Top             =   2040
      Width           =   2055
   End
   Begin VB.CommandButton EnterCmd 
      Caption         =   "Open"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2520
      TabIndex        =   4
      Top             =   1440
      Width           =   2055
   End
   Begin VB.TextBox FileName 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2520
      TabIndex        =   2
      Top             =   600
      Width           =   2175
   End
   Begin VB.FileListBox FileList 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1890
      Hidden          =   -1  'True
      Left            =   120
      Pattern         =   "*.ini"
      TabIndex        =   0
      Top             =   600
      Width           =   2055
   End
   Begin VB.Label Label2 
      Caption         =   "File name:"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2520
      TabIndex        =   3
      Top             =   120
      Width           =   2295
   End
   Begin VB.Label Label1 
      Caption         =   "Select trip file you wait to test:"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   240
      TabIndex        =   1
      Top             =   120
      Width           =   1935
   End
End
Attribute VB_Name = "FuncFileTake"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command2_Click()
  Unload Me
End Sub


Private Sub CancelCmd_Click()
  Unload Me
End Sub

Private Sub EnterCmd_Click()
  Dim TempFile As String
  Dim TempPath As String
  Dim i As Integer, TripNum As Integer
  Dim MasterNum As Integer
  On Error GoTo Err
  TempPath = App.Path & "\FuncTest"
  TempFile = Trim$(FileName.Text)
  PubFile = TempPath & "\" & TempFile
  MasterNum = GetFromINI("Master", "master", App.Path & "\functest\" & TempFile)
  If Not MasterNum = 1 Then
    FillComp = False
    FillSucc = False
    SetWindowPos FrmLogin.hwnd, HWND_TOPMOST, 200, 100, 480, 190, SWP_SHOWWINDOW
    Do Until FillComp
      DoEvents
    Loop
    If Not FillSucc Then
      Exit Sub
    End If
  End If
  TripNum = GetFromINI("count", "count", TempPath & "\" & TempFile)
  MaxFuncTstNum = TripNum
  ReDim FuncTstAry(TripNum - 1) As String
  For i = 1 To TripNum
    FuncTstAry(i - 1) = GetFromINI("test trip", i & "trip", TempPath & "\" & TempFile)
  Next i
  Unload Me
  Exit Sub
Err:
  DefMsgBox.Text1 = "Select the file first!"
    SetWindowPos DefMsgBox.hwnd, HWND_TOPMOST, 200, 100, 400, 185, SWP_SHOWWINDOW
  Do Until DefMsgComp
    DoEvents
  Loop
End Sub

Private Sub FileList_Click()
  FileName.Text = Trim$(FileList.FileName)
End Sub

Private Sub Form_Load()
  FileList.Path = App.Path & "\FuncTest"
End Sub


⌨️ 快捷键说明

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