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

📄 settings.frm

📁 扫描软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSettings 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "自定义 扫描设置"
   ClientHeight    =   4455
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4815
   Icon            =   "Settings.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4455
   ScaleWidth      =   4815
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.ComboBox cboColor 
      Height          =   315
      Left            =   960
      Style           =   2  'Dropdown List
      TabIndex        =   0
      Top             =   360
      Width           =   2415
   End
   Begin VB.Frame fraResolution 
      Caption         =   "分辨率"
      Height          =   1335
      Left            =   240
      TabIndex        =   9
      Top             =   840
      Width           =   3135
      Begin VB.TextBox txtVerticalDPI 
         Height          =   285
         Left            =   1200
         TabIndex        =   2
         Top             =   840
         Width           =   975
      End
      Begin VB.TextBox txtHorizontalDPI 
         Height          =   285
         Left            =   1200
         TabIndex        =   1
         Top             =   360
         Width           =   975
      End
      Begin VB.Label lblVerticalResolution 
         Caption         =   "竖:"
         Height          =   255
         Left            =   240
         TabIndex        =   12
         Top             =   840
         Width           =   855
      End
      Begin VB.Label lblHorizontalResolution 
         Caption         =   "横:"
         Height          =   255
         Left            =   240
         TabIndex        =   11
         Top             =   360
         Width           =   855
      End
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   3600
      TabIndex        =   7
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   375
      Left            =   3600
      TabIndex        =   6
      Top             =   3240
      Width           =   975
   End
   Begin VB.Frame fraPaperSize 
      Caption         =   "纸张大小"
      Height          =   1815
      Left            =   240
      TabIndex        =   8
      Top             =   2400
      Width           =   3135
      Begin VB.TextBox txtPaperHeight 
         Height          =   285
         Left            =   1200
         TabIndex        =   5
         Top             =   1320
         Width           =   975
      End
      Begin VB.TextBox txtPaperWidth 
         Height          =   285
         Left            =   1200
         TabIndex        =   4
         Top             =   840
         Width           =   975
      End
      Begin VB.ComboBox cboPaperSize 
         Height          =   315
         Left            =   1200
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label lblHeight 
         Caption         =   "高:"
         Height          =   255
         Left            =   240
         TabIndex        =   15
         Top             =   1320
         Width           =   735
      End
      Begin VB.Label lblWidth 
         Caption         =   "宽:"
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   840
         Width           =   735
      End
      Begin VB.Label lblPaperSize 
         Caption         =   "纸张:"
         Height          =   255
         Left            =   240
         TabIndex        =   13
         Top             =   360
         Width           =   615
      End
   End
   Begin VB.Label lblColor 
      Caption         =   "颜色:"
      Height          =   255
      Left            =   240
      TabIndex        =   10
      Top             =   360
      Width           =   495
   End
End
Attribute VB_Name = "frmSettings"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public Sub SetPaperSize(intIndex As Integer)
'**************************************************************
' PUBLIC SUB SetPaperSize
'**************************************************************

    Select Case intIndex
        Case psLetter
            txtPaperWidth.Text = Format(8.5, "Fixed")
            txtPaperHeight.Text = Format(11, "Fixed")
        Case psBusinessCard
            txtPaperWidth.Text = Format(3.5, "Fixed")
            txtPaperHeight.Text = Format(2, "Fixed")
        Case psPhoto
            txtPaperWidth.Text = Format(5, "Fixed")
            txtPaperHeight.Text = Format(3.5, "Fixed")
        Case psLargePhoto
            txtPaperWidth.Text = Format(7, "Fixed")
            txtPaperHeight.Text = Format(5, "Fixed")
        Case psTabloid
            txtPaperWidth.Text = Format(11, "Fixed")
            txtPaperHeight.Text = Format(17, "Fixed")
        Case psLedger
            txtPaperWidth.Text = Format(17, "Fixed")
            txtPaperHeight.Text = Format(11, "Fixed")
        Case psLegal
            txtPaperWidth.Text = Format(8.5, "Fixed")
            txtPaperHeight.Text = Format(14, "Fixed")
        Case psStatement
            txtPaperWidth.Text = Format(5.5, "Fixed")
            txtPaperHeight.Text = Format(8.5, "Fixed")
        Case psExecutive
            txtPaperWidth.Text = Format(7.25, "Fixed")
            txtPaperHeight.Text = Format(10.5, "Fixed")
        Case psA3
            txtPaperWidth.Text = Format(11.69, "Fixed")
            txtPaperHeight.Text = Format(16.54, "Fixed")
        Case psA4
            txtPaperWidth.Text = Format(8.27, "Fixed")
            txtPaperHeight.Text = Format(11.69, "Fixed")
        Case psA5
            txtPaperWidth.Text = Format(5.83, "Fixed")
            txtPaperHeight.Text = Format(8.27, "Fixed")
        Case psB4ISO
            txtPaperWidth.Text = Format(9.84, "Fixed")
            txtPaperHeight.Text = Format(13.9, "Fixed")
        Case psB4JIS
            txtPaperWidth.Text = Format(10.12, "Fixed")
            txtPaperHeight.Text = Format(14.33, "Fixed")
        Case psB5ISO
            txtPaperWidth.Text = Format(6.93, "Fixed")
            txtPaperHeight.Text = Format(9.84, "Fixed")
        Case psB5JIS
            txtPaperWidth.Text = Format(7.17, "Fixed")
            txtPaperHeight.Text = Format(10.12, "Fixed")
        Case psFolio
            txtPaperWidth.Text = Format(8.5, "Fixed")
            txtPaperHeight.Text = Format(13, "Fixed")
        Case psQuarto
            txtPaperWidth.Text = Format(8.46, "Fixed")
            txtPaperHeight.Text = Format(10.83, "Fixed")
        Case ps10x14
            txtPaperWidth.Text = Format(10, "Fixed")
            txtPaperHeight.Text = Format(14, "Fixed")
        Case psCustom
            txtPaperWidth.Text = Format(gdblPaperWidth, "Fixed")
            txtPaperHeight.Text = Format(gdblPaperHeight, "Fixed")
    End Select

End Sub

Private Sub cboPaperSize_Click()
'**************************************************************
' PRIVATE SUB cboPaperSize_Click
'**************************************************************

    Call SetPaperSize(cboPaperSize.ListIndex)
            
End Sub

Private Sub cmdCancel_Click()
'**************************************************************
' PRIVATE SUB cmdCancel
'**************************************************************
    
    Unload Me
    
End Sub

Private Sub cmdOK_Click()
'**************************************************************
' PRIVATE SUB cmdOK_Click:  Convert the page number text
' from the combo box to a long and display the new page.
'**************************************************************
'** Strings
    Dim strScanToDirectory As String
'** Variants
    Dim vntWorkingString As Variant
    
    '----------------------------------------------------------
    ' Save paper width and height.
    '----------------------------------------------------------
    gdblPaperWidth = txtPaperWidth.Text
    gdblPaperHeight = txtPaperHeight.Text
    
    '----------------------------------------------------------
    ' Save the preferences to the Windows Registry, and unload
    ' the frmSettings form.
    '----------------------------------------------------------
    Call GetSaveUserPreferences("Save")
    Unload Me

End Sub

Private Sub Form_Load()
'**************************************************************
' PRIVATE SUB Form_Load
'**************************************************************
    
    '----------------------------------------------------------
    ' Populate the cboColor combo box with the list of
    ' available document types.
    '----------------------------------------------------------
    cboColor.AddItem "Black and White"
    cboColor.AddItem "16 Shades of Gray"
    cboColor.AddItem "256 Shades of Gray"
    cboColor.AddItem "256 Colors"
    cboColor.AddItem "True Color (24-bit)"
        
    cboColor.ListIndex = gintColorIndex
    
    '----------------------------------------------------------
    ' Set the horizontal and vertical DPI.
    '----------------------------------------------------------
    txtHorizontalDPI.Text = gintHorizontalDPI
    txtVerticalDPI.Text = gintVerticalDPI

    '----------------------------------------------------------
    ' Populate the cboPaperSize combo box with the list of
    ' available document types.
    '----------------------------------------------------------
    cboPaperSize.AddItem "Letter"
    cboPaperSize.AddItem "Business Card"
    cboPaperSize.AddItem "Photo"
    cboPaperSize.AddItem "Large Photo"
    cboPaperSize.AddItem "Tabloid"
    cboPaperSize.AddItem "Ledger"
    cboPaperSize.AddItem "Legal"
    cboPaperSize.AddItem "Statement"
    cboPaperSize.AddItem "Executive"
    cboPaperSize.AddItem "A3"
    cboPaperSize.AddItem "A4"
    cboPaperSize.AddItem "A5"
    cboPaperSize.AddItem "B4 (ISO)"
    cboPaperSize.AddItem "B4 (JIS)"
    cboPaperSize.AddItem "B5 (ISO)"
    cboPaperSize.AddItem "B5 (JIS)"
    cboPaperSize.AddItem "Folio"
    cboPaperSize.AddItem "Quarto"
    cboPaperSize.AddItem "10x14 in."
'    cboPaperSize.AddItem "Custom"
        
    cboPaperSize.ListIndex = gintPaperSizeIndex
    Call SetPaperSize(cboPaperSize.ListIndex)
        
    '----------------------------------------------------------
    ' If the document type (set in frmPreferences) is "Custom,"
    ' then enable the appropriate fields; otherwise, disable
    ' them.
    '----------------------------------------------------------
    If frmPreferences.cboDocumentType.ListIndex = dtCustom Then
        cboColor.Enabled = True
        txtHorizontalDPI.Enabled = True
        txtVerticalDPI.Enabled = True
        cboPaperSize.Enabled = True
    Else
        cboColor.Enabled = False
        txtHorizontalDPI.Enabled = False
        txtVerticalDPI.Enabled = False
        cboPaperSize.Enabled = False
    End If
    
    '----------------------------------------------------------
    ' If the paper size is "Custom," then enable Width and
    ' Height; otherwise, disable them.
    '----------------------------------------------------------
    If cboPaperSize.ListIndex = psCustom Then
        txtPaperWidth.Enabled = True
        txtPaperHeight.Enabled = True
    Else
        txtPaperWidth.Enabled = False
        txtPaperHeight.Enabled = False
    End If
    
End Sub

⌨️ 快捷键说明

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