reportfilesave.frm

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

FRM
177
字号
VERSION 5.00
Begin VB.Form ReportFileSave 
   BorderStyle     =   5  'Sizable ToolWindow
   Caption         =   "File Save As"
   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 =   3  '窗口缺省
   Begin VB.CommandButton CancelCmd 
      Caption         =   "Cancel"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         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         =   "Enter"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         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            =   "宋体"
         Size            =   9
         Charset         =   134
         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            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2250
      Hidden          =   -1  'True
      Left            =   120
      Pattern         =   "*.ini"
      TabIndex        =   0
      Top             =   360
      Width           =   2055
   End
   Begin VB.Label Label2 
      Caption         =   "Enter the file name:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         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         =   "File:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   1
      Top             =   120
      Width           =   1215
   End
End
Attribute VB_Name = "reportFileSave"
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
  TempPath = App.Path & "\FuncTest"
  If LCase(Right(Trim$(FileName.Text), 4)) = ".ini" Then
    TempFile = Trim$(FileName)
  Else
    TempFile = Trim$(FileName) & ".ini"
  End If
  Open TempPath & "\" & TempFile For Output As #1
  Print #1, "[count]"
  Print #1, "count=" & (UBound(FuncTstAry) + 1)
  Print #1, "[test trip]"
  For i = 0 To UBound(FuncTstAry)
    Print #1, FuncTstAry(i) & "=1"
  Next i
  Close #1
  
  Unload Me
    
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 + -
显示快捷键?