📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
BackColor = &H0000C000&
BorderStyle = 0 'None
Caption = "注册向导"
ClientHeight = 2400
ClientLeft = 0
ClientTop = 0
ClientWidth = 4095
Icon = "Form4.frx":0000
LinkTopic = "Form4"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 160
ScaleMode = 3 'Pixel
ScaleWidth = 273
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin 工程1.xp_canvas xp_canvas1
Height = 2415
Left = 0
TabIndex = 1
Top = 0
Width = 4095
_ExtentX = 7223
_ExtentY = 4260
Caption = "注册向导"
Begin 工程1.xpcmdbutton Command1
Height = 375
Left = 1440
TabIndex = 5
Top = 1920
Width = 1335
_ExtentX = 2355
_ExtentY = 661
Caption = "确定"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.TextBox Text1
BackColor = &H0080FFFF&
BorderStyle = 0 'None
ForeColor = &H00FF8080&
Height = 255
IMEMode = 3 'DISABLE
Left = 1560
TabIndex = 0
Top = 1440
Width = 2295
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "软件注册参考数据:"
ForeColor = &H00FF0000&
Height = 180
Index = 1
Left = 240
TabIndex = 4
Top = 600
Width = 1620
End
Begin VB.Shape Shape2
BorderColor = &H00FF0000&
BorderWidth = 2
Height = 495
Index = 1
Left = 120
Shape = 4 'Rounded Rectangle
Top = 1320
Width = 3855
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "输入注册号码:"
ForeColor = &H00FF0000&
Height = 180
Left = 240
TabIndex = 3
Top = 1440
Width = 1260
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "通过录入参考数据可以注册该软件"
ForeColor = &H00FF0000&
Height = 255
Left = 240
TabIndex = 2
Top = 840
Width = 3015
End
Begin VB.Shape Shape2
BorderColor = &H00FF0000&
BorderWidth = 2
Height = 735
Index = 0
Left = 120
Shape = 4 'Rounded Rectangle
Top = 480
Width = 3855
End
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim k1 As String
Dim syspath1 As String
Dim syspath2 As String
Dim om As Long
Dim ml As Integer
Private Sub Command1_Click()
Dim i As Integer
If Text1.Text = CStr(om) Then
If Dir(syspath1) = "" Then
Open syspath1 For Output As #1
Print #1, k1
Close #1
End If
Call Main
Unload Me
Form1.Show
Else
If ml < 2 Then
ml = ml + 1
msg_txt = "录入错误,请重新录入!"
Load frmmsg
frmmsg.Show 1
Text1.Text = ""
Text1.SetFocus
Else
msg_txt = "软件拒绝你的使用,请提供商联系!"
Load frmmsg
frmmsg.Show
Unload Me
End If
End If
End Sub
Private Sub Form_Load()
Dim k As String
Dim cnt As Long
Dim lll As Integer
Dim dl As Long
Dim cname As String
Dim CurUser As String
Dim s As String * 80
Dim w As String * 80
Dim char1, char2 As String
Dim lenght As Long
Dim lenght1 As Long
Dim char As String
Dim omome As Integer
Dim di As Long
Dim pi As Long
Dim gi As Long
Form4.Move ((Screen.Width - Form4.Width) / 2), ((Screen.Height - Form4.Height) / 2)
lenght = GetSystemDirectory(s, Len(s))
lenght1 = GetWindowsDirectory(w, Len(w))
syspath1 = Left(s, lenght) + "\mile.com"
syspath2 = Left(s, lenght1) + "\fonts"
cnt = 199
k = String$(200, 0)
dl = GetComputerName(k, cnt)
cname = Left(k, cnt)
If Dir(syspath1) <> "" Then
If Dir(syspath2 + "\jsw1.ttf") = "" Then
Call AddFontResource(App.Path + "\jsw1.ttf")
di = SendMessagebynum(HWND_BROADCAST, WM_FONTCHANGE, 0, 0)
End If
Load Form3
Form3.Show
Unload Me
Exit Sub
End If
For lll = 1 To Len(cname)
omome = omome + Asc(Mid(cname, lll, 1))
Next lll
omome = omome + CStr(Year(Date)) + CStr(Day(Date)) + CStr(Month(Date))
Dim i As Integer
om = 0
For i = 1 To Len(omome)
om = om + Asc(Right(Left(omome, i), 1))
Next i
om = CLng(CStr(om) + CStr(omome)) + CLng(CStr(Year(Date)) + CStr(Day(Date)) + CStr(Month(Date))) * CLng(Right(Time, 2))
Label1(1).Caption = "参考数据: " + CStr(om)
End Sub
Private Sub Timer1_Timer()
If Text1.Text <> "" Then
Command1.Enabled = True
Else
Command1.Enabled = False
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Text1.Text <> "" Then
If KeyAscii = 13 Then
SendKeys "{tab}"
End If
Else
Text1.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -