📄 batchelor.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Batchelor
BorderStyle = 1 'Fixed Single
Caption = "Batchelor"
ClientHeight = 5775
ClientLeft = 2685
ClientTop = 3255
ClientWidth = 9525
Icon = "Batchelor.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 5775
ScaleWidth = 9525
Begin MSComctlLib.ImageList ImageList2
Left = 8835
Top = -30
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Batchelor.frx":030A
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Batchelor.frx":075C
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Batchelor.frx":0BAE
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Batchelor.frx":1488
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Batchelor.frx":1D62
Key = ""
EndProperty
EndProperty
End
Begin MSComDlg.CommonDialog comDlgFormats
Left = 4080
Top = 5055
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Frame Frame3
Caption = "Printer"
Height = 1155
Left = 90
TabIndex = 10
Top = 2400
Width = 4185
Begin VB.CheckBox chkUsePrinterSpecifiedinFormat
Caption = "Use Printer Specified in Format"
Height = 225
Left = 255
TabIndex = 13
Top = 330
Value = 1 'Checked
Width = 3210
End
Begin VB.ComboBox cboWhatPrinter
Enabled = 0 'False
Height = 315
ItemData = "Batchelor.frx":207C
Left = 210
List = "Batchelor.frx":207E
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 11
Top = 675
Width = 3555
End
End
Begin VB.Frame Frame2
Caption = "Copies"
Height = 1950
Left = 90
TabIndex = 2
Top = 3660
Width = 4170
Begin VB.CheckBox chkUseSpecifiedAmountinFormat
Caption = "Use Specified Amount in Format"
Height = 195
Left = 225
TabIndex = 14
Top = 330
Value = 1 'Checked
Width = 3375
End
Begin VB.TextBox txtNumberOfBatchCopies
Height = 315
Left = 2520
MaxLength = 6
TabIndex = 5
Text = "1"
Top = 1470
Width = 1050
End
Begin VB.TextBox txtNumberOfIdenticalCopies
Height = 315
Left = 2520
MaxLength = 6
TabIndex = 4
Text = "1"
Top = 630
Width = 1050
End
Begin VB.TextBox txtNumberOfSerializedCopies
Height = 315
Left = 2520
MaxLength = 6
TabIndex = 3
Text = "1"
Top = 1080
Width = 1050
End
Begin VB.Label Label1
Caption = "Number of Batch Copies"
Height = 255
Left = 225
TabIndex = 8
Top = 1515
Width = 1740
End
Begin VB.Label lblnumberofidentical
Caption = "Number of Identical Copies"
Height = 240
Left = 225
TabIndex = 7
Top = 690
Width = 1965
End
Begin VB.Label Label2
Caption = "Number of Serialized Copies"
Height = 210
Left = 225
TabIndex = 6
Top = 1125
Width = 1995
End
End
Begin VB.Frame Frame1
Caption = "BarTender Formats"
Height = 1875
Left = 75
TabIndex = 0
Top = 420
Width = 9360
Begin VB.ListBox list_Formats
Height = 1425
Left = 195
TabIndex = 12
Top = 285
Width = 7665
End
Begin VB.CommandButton cmdRemove
Caption = "Remove"
Height = 390
Left = 8025
TabIndex = 9
Top = 750
Width = 1125
End
Begin VB.CommandButton cmdAdd
Caption = "Add"
Height = 405
Left = 8040
TabIndex = 1
Top = 270
Width = 1125
End
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 360
Left = 0
TabIndex = 15
Top = 0
Width = 9525
_ExtentX = 16801
_ExtentY = 635
ButtonWidth = 609
ButtonHeight = 582
Appearance = 1
Style = 1
ImageList = "ImageList2"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 5
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Visibility"
Object.ToolTipText = "Show BarTender"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Export"
Object.ToolTipText = "Open / Export"
ImageIndex = 5
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Key = "SendText"
Object.ToolTipText = "Edit Sub-String"
ImageIndex = 2
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Key = "Save"
Object.ToolTipText = "Save Format"
ImageIndex = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Key = "Print"
Object.ToolTipText = "Print"
ImageIndex = 4
EndProperty
EndProperty
Begin VB.Frame Frame4
Caption = "Whats"
Height = 100
Left = 45
TabIndex = 16
Top = 450
Width = 9480
End
End
Begin VB.Image imgBTFormat
Height = 2700
Left = 4830
Stretch = -1 'True
Top = 2700
Width = 4230
End
Begin VB.Shape Shape1
BackColor = &H80000003&
BackStyle = 1 'Opaque
Height = 3135
Left = 4500
Top = 2490
Width = 4905
End
Begin VB.Menu mnuFile
Caption = "&File"
WindowList = -1 'True
Begin VB.Menu mnuVisible
Caption = "&Visible"
End
Begin VB.Menu mnuExportOpen
Caption = "&Export / Open"
End
Begin VB.Menu mnuSave
Caption = "&Save"
Enabled = 0 'False
End
Begin VB.Menu mnuPrintBatch
Caption = "&Print"
Enabled = 0 'False
End
Begin VB.Menu mnu0
Caption = "-"
End
Begin VB.Menu mnuExit
Caption = "E&xit"
End
End
Begin VB.Menu mnuEdit
Caption = "&Edit"
Begin VB.Menu mnuSendText
Caption = "&Send Text"
Enabled = 0 'False
End
End
Begin VB.Menu mnuHelp
Caption = "&Help"
Begin VB.Menu mnuAbout
Caption = "&About"
End
End
End
Attribute VB_Name = "Batchelor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub chkUsePrinterSpecifiedinFormat_Click()
'If the "Use Printer Specified in Format" check box is checked then uncheck it
'and let the user pick which printer they want to print to.
If chkUsePrinterSpecifiedinFormat.Value = 1 Then
cboWhatPrinter.Enabled = False
Else
cboWhatPrinter.Enabled = True
End If
End Sub
Private Sub chkUseSpecifiedAmountinFormat_Click()
If chkUseSpecifiedAmountinFormat.Value = 1 Then 'if this check box is unchecked then check it and...
txtNumberOfIdenticalCopies.Enabled = False 'disable the Number of Identical copies text box
txtNumberOfSerializedCopies.Enabled = False 'disable the Number of serialized copies text box
txtNumberOfSerializedCopies.BackColor = -2147483644 'Change the background of the text boxes
txtNumberOfIdenticalCopies.BackColor = -2147483644 'to a grey color
Else
txtNumberOfIdenticalCopies.Enabled = True 'Enable the Number of identical copies for manipulation.
txtNumberOfSerializedCopies.Enabled = True 'Enable the Number of Serialized Copies for manipulation.
txtNumberOfSerializedCopies.BackColor = -2147483643 'set the back ground of this text boxes to white.
txtNumberOfIdenticalCopies.BackColor = -2147483643 'set the background of this text boxes to white.
txtNumberOfIdenticalCopies.SetFocus 'Set the cursor focus to be in the identical copies of label text box.
End If
End Sub
Private Sub cmdAdd_Click()
On Error GoTo ErrorHandler
comDlgFormats.FileName = ""
'Set filters
comDlgFormats.Filter = "BarTender Label Formats (*.btw)|*.btw|"
'Specify default filter
comDlgFormats.FilterIndex = 2
'Display the Open dialog box
comDlgFormats.ShowOpen
'sends the format file name and path to a public Variable called m_sNewFormat
m_sNewFormat = comDlgFormats.FileName
'Add the file selected as long as the name is blank...
If m_sNewFormat <> "" Then list_Formats.AddItem m_sNewFormat
' if there's just 1 entry in the formats then high-light that format
If list_Formats.ListCount = 1 Then
list_Formats.ListIndex = 0
mnuExportOpen_Click
End If
' if there's 1 entry or more in the formats list
' Enable the print options other wise leave them disabled.
If list_Formats.ListCount > 0 Then
mnuPrintBatch.Enabled = True
Toolbar1.Buttons.Item(5).Enabled = True '5 = Print Batch
Else
mnuPrintBatch.Enabled = False
Toolbar1.Buttons.Item(5).Enabled = False '5 = Print Batch
End If
ErrorHandler:
Exit Sub
End Sub
Public Sub p_OpenFormat()
On Error GoTo ErrorHandler
'if the "Use Printer Specified in Format" check box is checked then'
'open the format with no specified printer if or else open the label with
'the printer that's specified from the printer drop down list.
If chkUsePrinterSpecifiedinFormat.Value = 1 Then
'open the format with the default printer while closing any labels which may be up
Set BtFormat = BtApp.Formats.Open(m_sSelectedFormat, True)
Else
'Open the format with the selected printer in the printer drop down list.
Set BtFormat = BtApp.Formats.Open(m_sSelectedFormat, True, cboWhatPrinter.Text)
End If
' if the code gets to here then the format has opened successfully
m_bOpenFormatFailed = False
Exit Sub
ErrorHandler:
m_bOpenFormatFailed = True 'If an Error has occured then the format opened has failed setting the flag...
p_ErrorHandler 'Go to the Error Handler procedure which is in the Flags Module
End Sub
Private Sub mnuAbout_Click()
dbxAbout.Show vbModal
End Sub
Private Sub mnuExportOpen_Click()
On Error GoTo ErrorHandler
'As long as there's a format name in the list then go on to Open and then Export this label format.
If list_Formats.ListIndex <> -1 Then
m_sSelectedFormat = list_Formats.List(list_Formats.ListIndex)
'Go to the p_OpenFormat procedure to Open the Selected label formats
p_OpenFormat
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -