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

📄 form1.frm

📁 方便输入序列号的工具
💻 FRM
字号:
VERSION 5.00
Begin VB.Form SnInput 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "SnInput"
   ClientHeight    =   2925
   ClientLeft      =   150
   ClientTop       =   435
   ClientWidth     =   3255
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2925
   ScaleWidth      =   3255
   StartUpPosition =   3  '窗口缺省
   Begin VB.CheckBox Check1 
      Caption         =   "使用时无须发送TAB键"
      Height          =   255
      Left            =   1200
      TabIndex        =   1
      Top             =   2640
      Width           =   2175
   End
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   2280
      Top             =   1560
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   1  'Fixed Single
      Caption         =   $"Form1.frx":030A
      Height          =   2895
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   3255
   End
End
Attribute VB_Name = "SnInput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Dim isFinishTask As Boolean

Private Sub Timer1_Timer()
Dim SetText As String, i As Integer, tmpstr As String, char As String * 1
    If isFinishTask Then End
    If GetKeyState(122) < 0 Then
        If Dir("sn.txt") <> "" Then
            Open "sn.txt" For Input As #1
            Line Input #1, SetText
            Close #1
         ElseIf Len(App.EXEName) > 7 Then
            SetText = Mid(App.EXEName, 9)
         ElseIf Command <> "" Then
            SetText = Command
        Else
            SetText = Clipboard.GetText
        End If
        If Left(SetText, 1) = "." Then Check1.Value = 1
        For i = 1 - (Left(SetText, 1) = ".") To Len(SetText) + (Left(SetText, 1) = ".")
            char = Mid(SetText, i, 1)
            If char <> "-" And char <> " " Then
            tmpstr = tmpstr + char
            Else
                If Check1.Value = 0 Then
                    SendKeys tmpstr + Chr(9)
                Else
                    SendKeys tmpstr
                End If
                tmpstr = ""
            End If
        Next i
        SendKeys tmpstr + Chr(9)
        isFinishTask = True
    End If
End Sub

⌨️ 快捷键说明

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