📄 frmmain.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmMain
BorderStyle = 3 'Fixed Dialog
Caption = "Character Recognition"
ClientHeight = 5055
ClientLeft = 1755
ClientTop = 1410
ClientWidth = 8730
DrawStyle = 5 'Transparent
FillColor = &H00C0FFFF&
FillStyle = 2 'Horizontal Line
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000018&
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
MouseIcon = "frmMain.frx":0442
ScaleHeight = 5055
ScaleWidth = 8730
ShowInTaskbar = 0 'False
Begin MSComctlLib.ProgressBar progressRecognition
Height = 375
Left = 3120
TabIndex = 14
Top = 3240
Width = 2535
_ExtentX = 4471
_ExtentY = 661
_Version = 393216
BorderStyle = 1
Appearance = 0
Scrolling = 1
End
Begin VB.CommandButton buttonLearnCancel
Caption = "&Cancel"
Height = 375
Left = 1080
TabIndex = 7
Top = 4320
Width = 615
End
Begin VB.CommandButton buttonLearnConfirm
Caption = "Enter"
Height = 375
Left = 360
Picture = "frmMain.frx":074C
TabIndex = 6
Top = 4320
Width = 615
End
Begin VB.TextBox inputLearnCharacter
Appearance = 0 'Flat
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1800
TabIndex = 5
Top = 4080
Width = 495
End
Begin VB.CommandButton buttonLearn
Caption = "Learn"
Height = 375
Left = 6000
TabIndex = 4
Top = 3240
Width = 2535
End
Begin VB.CommandButton buttonRecognise
Caption = "&Recognise"
Height = 375
Left = 1440
TabIndex = 3
Top = 3240
Width = 1335
End
Begin VB.CommandButton buttonClearScreen
Caption = "&Clear Screen"
Height = 375
Left = 240
TabIndex = 2
Top = 3240
Width = 1215
End
Begin VB.PictureBox AppTemplateArea
BackColor = &H80000001&
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2655
Left = 3120
ScaleHeight = 2595
ScaleWidth = 2475
TabIndex = 1
Top = 480
Width = 2535
End
Begin VB.PictureBox userTemplateArea
BackColor = &H80000005&
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2655
Left = 6000
ScaleHeight = 2595
ScaleWidth = 2475
TabIndex = 0
Top = 480
Width = 2535
End
Begin VB.Frame frameArea1
Caption = "User's Draw Area"
Height = 3495
Left = 120
TabIndex = 8
Top = 240
Width = 2775
Begin VB.PictureBox userDrawArea
BackColor = &H80000016&
DrawStyle = 2 'Dot
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2655
Left = 120
ScaleHeight = 2595
ScaleWidth = 2475
TabIndex = 11
Top = 240
Width = 2535
End
End
Begin VB.Frame frameArea3
Caption = "Buffer Data Area"
Height = 3495
Left = 5880
TabIndex = 10
Top = 240
Width = 2775
End
Begin VB.Frame frameArea2
Caption = "Database Area"
Height = 3495
Left = 3000
TabIndex = 9
Top = 240
Width = 2775
End
Begin VB.Label Label1
Caption = "About"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7800
TabIndex = 15
Top = 3840
Width = 975
End
Begin VB.Label TeachLabelText
Caption = "Enter a character that must be taught"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 360
TabIndex = 12
Top = 3840
Width = 2175
End
Begin VB.Label textResult
Caption = "Character Recognition Ready..."
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 225
Left = 120
TabIndex = 13
Top = 4800
Width = 3015
End
Begin VB.Menu mnuPopUp
Caption = "mnuPopUp"
Visible = 0 'False
Begin VB.Menu mnuPopUp_About
Caption = "&About"
End
Begin VB.Menu mnuPopUp_Close
Caption = "&Close"
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Main_inputLearnCharacter As String
Dim strCaption As String
Dim recordFileExtension As String
Dim currentlyDrawing As Boolean
Dim c As Integer
Dim strData As String
Dim strRECpk As String
Dim arrRawData(100 * 100) As String
Dim arrTagData(100 * 100) As String
Private Sub buttonLearnCancel_Click()
Me.TeachLabelText.FontBold = True
Me.TeachLabelText.Caption = strCaption
Me.buttonLearnConfirm.Visible = False
Me.buttonLearnCancel.Visible = False
Me.inputLearnCharacter.Visible = False
Me.buttonLearn.Visible = True
Me.buttonRecognise.Visible = True
Me.buttonClearScreen.Visible = True
End Sub
Private Sub buttonClearScreen_Click()
strData = ""
Me.textResult.Caption = ""
Me.textResult.ToolTipText = ""
Me.Refresh
' Clear all the drawing windows....
userDrawArea.Cls
AppTemplateArea.Cls
userTemplateArea.Cls
' Enable all buttons
Me.buttonLearn.Enabled = False
Me.buttonRecognise.Enabled = False
Me.buttonClearScreen.Enabled = False
End Sub
Private Sub buttonLearnConfirm_Click()
Dim Filename_Database As String
Dim Filename_buttonLearn As String
Dim Buffer_DrawArea As Variant
Dim strbuttonLearnText As String
Dim intCounter As Integer
Dim strBuffer As String
'Dim buttonLearnDialog As New frmbuttonLearn
'Dim oFile As TextStream
' Set oFile = New TextStream
FileSystem.ChDir (App.Path)
userTemplateArea.Cls
strbuttonLearnText = Me.inputLearnCharacter.Text
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -