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

📄 mfrm_pagesetup.frm

📁 套打程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form mFrm_PageSetup 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "页面设置"
   ClientHeight    =   2625
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6525
   Icon            =   "mFrm_pagesetup.frx":0000
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2625
   ScaleWidth      =   6525
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.CheckBox ChkColFirst 
      Caption         =   "先列后行(&F)"
      Height          =   255
      Left            =   2160
      TabIndex        =   18
      Top             =   2220
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Caption         =   "滚动行/列:(毫米)"
      Height          =   1125
      Left            =   2160
      TabIndex        =   5
      Top             =   540
      Width           =   4245
      Begin VB.TextBox TxtHeight 
         Alignment       =   1  'Right Justify
         Height          =   285
         Left            =   1080
         TabIndex        =   7
         Top             =   278
         Width           =   885
      End
      Begin VB.TextBox TxtCount 
         Alignment       =   1  'Right Justify
         Height          =   285
         Left            =   1080
         TabIndex        =   9
         Top             =   660
         Width           =   885
      End
      Begin VB.TextBox TxtColCount 
         Alignment       =   1  'Right Justify
         Height          =   285
         Left            =   3030
         TabIndex        =   13
         Top             =   690
         Width           =   885
      End
      Begin VB.TextBox TxtWidth 
         Alignment       =   1  'Right Justify
         Height          =   285
         Left            =   3030
         TabIndex        =   11
         Top             =   278
         Width           =   885
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "列数(&N):"
         Height          =   180
         Left            =   2220
         TabIndex        =   12
         Top             =   720
         Width           =   810
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "列宽(&W):"
         Height          =   180
         Left            =   2220
         TabIndex        =   10
         Top             =   330
         Width           =   810
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "行数(&U):"
         Height          =   180
         Left            =   270
         TabIndex        =   8
         Top             =   705
         Width           =   810
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "行高(&H):"
         Height          =   180
         Left            =   270
         TabIndex        =   6
         Top             =   330
         Width           =   810
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "打印方向:"
      Height          =   1125
      Left            =   90
      TabIndex        =   2
      Top             =   540
      Width           =   1995
      Begin VB.OptionButton OptPortrait 
         Caption         =   "纵向(&O)"
         Height          =   225
         Left            =   870
         TabIndex        =   3
         TabStop         =   0   'False
         Top             =   270
         Width           =   975
      End
      Begin VB.OptionButton OptLandScape 
         Caption         =   "横向(&A)"
         Height          =   225
         Left            =   870
         TabIndex        =   4
         TabStop         =   0   'False
         Top             =   660
         Width           =   945
      End
      Begin VB.Image Image2 
         Appearance      =   0  'Flat
         Height          =   345
         Left            =   210
         Picture         =   "mFrm_pagesetup.frx":0442
         Top             =   360
         Visible         =   0   'False
         Width           =   465
      End
      Begin VB.Image Image1 
         Appearance      =   0  'Flat
         Height          =   465
         Left            =   270
         Picture         =   "mFrm_pagesetup.frx":0634
         Top             =   300
         Visible         =   0   'False
         Width           =   375
      End
   End
   Begin VB.CheckBox ChkDefault 
      Caption         =   "设为默认值(&D)"
      Height          =   225
      Left            =   90
      TabIndex        =   17
      TabStop         =   0   'False
      Top             =   2235
      Width           =   1575
   End
   Begin VB.TextBox TxtName 
      Height          =   285
      Left            =   1440
      TabIndex        =   1
      Top             =   105
      Width           =   4905
   End
   Begin VB.CommandButton CmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取  消(&C)"
      Height          =   375
      Left            =   5190
      TabIndex        =   20
      Top             =   2130
      Width           =   1215
   End
   Begin VB.CommandButton CmdOK 
      Caption         =   "确  定(&O)"
      Height          =   375
      Left            =   3840
      TabIndex        =   19
      Top             =   2130
      Width           =   1245
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "页面大小(毫米)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   180
      Index           =   1
      Left            =   450
      TabIndex        =   14
      Top             =   1815
      Width           =   1380
   End
   Begin VB.Label LabWidth 
      BackStyle       =   0  'Transparent
      Caption         =   "页宽:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   225
      Left            =   4140
      TabIndex        =   16
      Top             =   1800
      Width           =   1395
   End
   Begin VB.Label LabHeight 
      BackStyle       =   0  'Transparent
      Caption         =   "页高:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   225
      Left            =   2160
      TabIndex        =   15
      Top             =   1800
      Width           =   1395
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "单据名称(&N):"
      Height          =   180
      Index           =   0
      Left            =   210
      TabIndex        =   0
      Top             =   150
      Width           =   1170
   End
End
Attribute VB_Name = "mFrm_PageSetup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const mc_ShowMode = vbMillimeters

Private Sub CmdCancel_Click()
    Unload Me
End Sub

Private Sub CmdOK_Click()
    TxtName.Text = Trim(TxtName.Text)
    If Trim(TxtName.Text) = "" Then
        MsgBox "请输入单据名称!", vbExclamation, Me.Caption
        TxtName.SetFocus
        Exit Sub
    End If
    With g_ActFrm
        .Caption = TxtName.Text
        .mRowCount = Val(TxtCount.Text)
        .mRowHeight = .ScaleY(Val(TxtHeight.Text), mc_ShowMode, .ScaleMode)
        .mColCount = Val(TxtColCount.Text)
        .mColWidth = .ScaleX(Val(TxtWidth.Text), mc_ShowMode, .ScaleMode)
        .mBlnColFirst = (ChkColFirst.Value = 1)
        .mLandScape = OptLandScape.Value
        .mIsDefault = (ChkDefault.Value = 1)
    End With
    Call CmdCancel_Click
End Sub

Private Sub Form_Load()
    With g_ActFrm
        TxtName.Text = .Caption
        TxtHeight.Text = Format(.ScaleY(.mRowHeight, .ScaleMode, mc_ShowMode), "0.0#")
        TxtCount.Text = .mRowCount
        TxtWidth.Text = Format(.ScaleX(.mColWidth, .ScaleMode, mc_ShowMode), "0.0#")
        TxtColCount.Text = .mColCount
        ChkColFirst.Value = IIf(.mBlnColFirst, 1, 0)
        LabWidth.Caption = LabWidth.Caption & Format(.ScaleX(.PicPage.Width, .ScaleMode, mc_ShowMode), "0.0#")
        LabHeight.Caption = LabHeight.Caption & Format(.ScaleY(.PicPage.Height, .ScaleMode, mc_ShowMode), "0.0#")
        If .mLandScape Then OptLandScape.Value = True Else OptPortrait.Value = True
        ChkDefault.Value = IIf(.mIsDefault, 1, 0)
    End With
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set mFrm_PageSetup = Nothing
End Sub

Private Sub OptLandScape_Click()
    Image2.Visible = OptLandScape.Value: Image1.Visible = Not Image2.Visible
End Sub

Private Sub OptPortrait_Click()
    Image1.Visible = OptPortrait.Value: Image2.Visible = Not Image1.Visible
End Sub

Private Sub TxtCount_Change()
    TxtCount.Text = IIf(Val(Trim(TxtCount.Text)) = 0, 5, Val(Trim(TxtCount.Text)))
End Sub

Private Sub TxtHeight_Change()
    TxtHeight.Text = IIf(Val(Trim(TxtHeight.Text)) = 0, 400, Val(Trim(TxtHeight.Text)))
End Sub

Private Sub TxtName_GotFocus()
    With TxtName
        .SelStart = 0
        .SelLength = Len(.Text)
    End With
End Sub

⌨️ 快捷键说明

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