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

📄 dialog1.frm

📁 联机手写汉字识别
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Dialog 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   1755
   ClientLeft      =   2760
   ClientTop       =   3375
   ClientWidth     =   5070
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1755
   ScaleWidth      =   5070
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   480
      TabIndex        =   2
      Top             =   1080
      Width           =   2295
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   3720
      TabIndex        =   1
      Top             =   600
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "OK"
      Height          =   375
      Left            =   3720
      TabIndex        =   0
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label Label2 
      Height          =   255
      Left            =   3240
      TabIndex        =   4
      Top             =   1200
      Width           =   1575
   End
   Begin VB.Label Label1 
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   480
      TabIndex        =   3
      Top             =   360
      Width           =   2295
   End
End
Attribute VB_Name = "Dialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub CancelButton_Click()
    Unload Me
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dialog.Text1.SetFocus
End Sub

Private Sub OKButton_Click()
    If Len(Text1.Text) = 0 Then
        MsgBox "建议输入大于 0.5 的数值, Cancel 放弃"
        Text1.SetFocus
        Exit Sub
    End If
    
    If CSng(Text1.Text) <= 0.5 Or CSng(Text1.Text) > 1 Then
        MsgBox "建议输入大于 0.5 的数值,Cancel 放弃"
        Text1.SelStart = 0
        Text1.SelLength = Len(Text1.Text)
        Text1.SetFocus
        Exit Sub
    End If
    If R_Flag = True Then
        Resemble_Extent = CSng(Text1.Text)
        MsgBox "识别类似度=0" & Resemble_Extent
    Else
        Resemble_Limit = CSng(Text1.Text)
        MsgBox "候选字门限值=0" & Resemble_Limit
    End If
    CancelButton = True
End Sub


Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        KeyAscii = 0
        If Len(Text1.Text) <> 0 Then
            OKButton.Value = True
        End If
    Else
        If KeyAscii = Asc(".") Or KeyAscii = 8 Then
            Exit Sub
        End If
        
        If KeyAscii < Asc(0) Or KeyAscii > Asc(9) Then
            KeyAscii = 0
        End If
    End If
End Sub

⌨️ 快捷键说明

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