📄 scancont.frm
字号:
VERSION 5.00
Begin VB.Form frmContinueBatchScan
BorderStyle = 3 'Fixed Dialog
Caption = "Prepare Scanner"
ClientHeight = 3270
ClientLeft = 2040
ClientTop = 2040
ClientWidth = 6000
ControlBox = 0 'False
Icon = "Scancont.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 3270
ScaleWidth = 6000
ShowInTaskbar = 0 'False
Begin VB.CheckBox chkUseFlatbed
Caption = "&Use Flatbed"
Height = 228
Left = 3456
TabIndex = 11
Top = 2736
Width = 2100
End
Begin VB.CommandButton butStop
Cancel = -1 'True
Caption = "氨ゎ苯核"
Height = 492
Left = 3450
TabIndex = 10
Top = 1560
Width = 2292
End
Begin VB.CommandButton butGo
Caption = "膥尿苯核"
Default = -1 'True
Height = 492
Left = 3450
TabIndex = 9
Top = 960
Width = 2292
End
Begin VB.Frame Frame3
Caption = "Page Count"
Height = 852
Left = 240
TabIndex = 5
Top = 2160
Width = 3012
Begin VB.TextBox NoOfPages
Height = 288
Left = 1920
TabIndex = 8
Text = "1"
Top = 480
Width = 852
End
Begin VB.OptionButton radioNumberofPages
Caption = "&Number of pages:"
Height = 252
Left = 100
TabIndex = 7
Top = 480
Width = 1692
End
Begin VB.OptionButton radioAllSheets
Caption = "&All sheets in stack"
Height = 252
Left = 100
TabIndex = 6
Top = 240
Value = -1 'True
Width = 1692
End
End
Begin VB.Frame Frame2
Caption = "Next Page"
Height = 1212
Left = 240
TabIndex = 2
Top = 840
Width = 3012
Begin VB.OptionButton radioFront
Caption = "&Back of sheet %n"
Height = 252
Index = 1
Left = 100
TabIndex = 4
Top = 720
Width = 1692
End
Begin VB.OptionButton radioFront
Caption = "&Front of sheet %n"
Height = 252
Index = 0
Left = 100
TabIndex = 3
Top = 360
Width = 1692
End
End
Begin VB.Frame Frame1
Height = 540
Left = 240
TabIndex = 0
Top = 240
Width = 5532
Begin VB.Label ScanName
Caption = "Scanner Name"
Height = 372
Left = 120
TabIndex = 1
Top = 120
Width = 5364
End
End
End
Attribute VB_Name = "frmContinueBatchScan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public ctrActivePixEzImage As PixEzImage
Private lReturn As Long
Private go As Boolean
Public Sub StartForm(ctrPixEzImage As PixEzImage)
Dim NumPages As Long
Dim StopScan As Long
Dim UseFeeder As Long
Dim ScanBacks As Long
On Error Resume Next
Set ctrActivePixEzImage = ctrPixEzImage
Dim iPage As Integer
If (ctrActivePixEzImage.ScanMaxPages > 0) Then
NoOfPages = ctrActivePixEzImage.ScanMaxPages
radioNumberofPages.Enabled = True
radioNumberofPages.Value = True
radioAllSheets.Enabled = True
Else
ctrActivePixEzImage.ScanMaxPages = -1
NoOfPages = ""
radioAllSheets.Enabled = True
radioNumberofPages.Enabled = False
radioAllSheets.Value = True
End If
ScanName.Caption = ctrActivePixEzImage.ScanName
Load frmContinueBatchScan
go = False
radioFront(0).Value = True
radioFront(0).Enabled = True
iPage = ctrActivePixEzImage.ScanCurrentPage
radioFront(0).Caption = "&Front of sheet " & (iPage)
radioFront(1).Caption = "&Back of sheet " & (iPage - 1)
radioFront(1).Enabled = True
frmContinueBatchScan.Show 1
StopScan = Not go
ScanBacks = radioFront(1).Value
End Sub
Public Function ShowPrepareScannerDialog(ctrPixEzImage As PixEzImage, NumPages As Long, StopScan As Long, UseFeeder As Long, ScanBacks As Long) As Long
Static lStaticUseFlatBed As Long
On Error Resume Next
Set ctrActivePixEzImage = ctrPixEzImage
Dim iPage As Integer
If (ctrActivePixEzImage.ScanMaxPages > 0) Then
NoOfPages = ctrActivePixEzImage.ScanMaxPages
radioNumberofPages.Enabled = True
radioNumberofPages.Value = True
radioAllSheets.Enabled = True
Else
ctrActivePixEzImage.ScanMaxPages = -1
NoOfPages = ""
radioAllSheets.Enabled = True
radioNumberofPages.Enabled = False
radioAllSheets.Value = True
End If
ScanName.Caption = ctrActivePixEzImage.ScanName
Load frmContinueBatchScan
go = False
radioFront(0).Value = True
radioFront(0).Enabled = True
iPage = ctrActivePixEzImage.ScanCurrentPage
radioFront(0).Caption = "&Front of sheet " & (iPage)
radioFront(1).Caption = "&Back of sheet " & (iPage - 1)
If NumPages > 0 Then
radioFront(1).Enabled = True
Else
radioFront(1).Enabled = False
End If
chkUseFlatbed.Value = lStaticUseFlatBed
frmContinueBatchScan.Show 1
StopScan = Not go
ScanBacks = radioFront(1).Value
If chkUseFlatbed.Value = 1 Then
UseFeeder = 0
End If
lStaticUseFlatBed = chkUseFlatbed.Value
ShowPrepareScannerDialog = lReturn
Unload Me
End Function
Private Sub butGo_Click()
On Error Resume Next
Screen.MousePointer = 11
go = True
If (radioAllSheets.Value) Then
ctrActivePixEzImage.ScanMaxPages = -1
Else
If ctrActivePixEzImage.ScanDuplex = 1 And (Val(NoOfPages) Mod 2) <> 0 Then
MsgBox "Number of pages should be even for a Duplex Scan"
Screen.MousePointer = vbDefault
go = False
Exit Sub
End If
ctrActivePixEzImage.ScanMaxPages = Val(NoOfPages)
End If
Unload frmContinueBatchScan
Screen.MousePointer = vbDefault
DoEvents
End Sub
Private Sub butStop_Click()
go = False
Unload Me
End Sub
Private Sub Form_Load()
' center form
'
Me.Move (Screen.Width - Me.Width) / 2, _
(Screen.Height - Me.Height) / 2
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set ctrActivePixEzImage = Nothing
End Sub
Private Sub NoOfPages_Change()
radioNumberofPages.Enabled = Val(NoOfPages) > 0
radioNumberofPages.Value = Val(NoOfPages) > 0
radioAllSheets.Value = Not (Val(NoOfPages) > 0)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -