?? frm_znsb.frm
字號:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frm_znsb
BorderStyle = 3 'Fixed Dialog
Caption = "采購管理系統(試用版智能監測程序)"
ClientHeight = 2250
ClientLeft = 45
ClientTop = 330
ClientWidth = 4200
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2250
ScaleWidth = 4200
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "隱藏"
Height = 300
Left = 3240
TabIndex = 12
Top = 1960
Width = 855
End
Begin VB.TextBox Text2
Height = 375
Left = 1920
TabIndex = 11
Top = 4320
Width = 2055
End
Begin VB.TextBox Text1
Height = 375
Left = 1920
TabIndex = 10
Top = 3840
Width = 2055
End
Begin VB.TextBox Txt_temp1
Height = 375
Left = 1920
TabIndex = 9
Top = 3240
Width = 2055
End
Begin VB.Frame Frame1
Caption = "當前版本信息"
ForeColor = &H000000C0&
Height = 1815
Left = 120
TabIndex = 0
Top = 120
Width = 3975
Begin MSComCtl2.DTPicker DT_sc
Height = 300
Left = 1320
TabIndex = 7
Top = 240
Width = 2535
_ExtentX = 4471
_ExtentY = 529
_Version = 393216
Enabled = 0 'False
Format = 29949953
CurrentDate = 38271
End
Begin MSComCtl2.DTPicker DT2
Height = 300
Left = 1320
TabIndex = 5
Top = 960
Width = 2535
_ExtentX = 4471
_ExtentY = 529
_Version = 393216
Enabled = 0 'False
Format = 29949953
CurrentDate = 38271
End
Begin MSComCtl2.DTPicker DT1
Height = 300
Left = 1320
TabIndex = 3
Top = 600
Width = 2535
_ExtentX = 4471
_ExtentY = 529
_Version = 393216
Enabled = 0 'False
Format = 29949953
CurrentDate = 38271
End
Begin VB.Label Label5
BackColor = &H00FF8080&
ForeColor = &H00000080&
Height = 255
Left = 120
TabIndex = 6
Top = 1440
Width = 3735
End
Begin VB.Label Label4
Caption = "軟件到期時間"
Height = 255
Left = 120
TabIndex = 4
Top = 1080
Width = 1095
End
Begin VB.Label Label2
Caption = "系統當前日期"
Height = 375
Left = 120
TabIndex = 2
Top = 720
Width = 1335
End
Begin VB.Label Label1
Caption = "首次安裝日期"
Height = 255
Left = 120
TabIndex = 1
Top = 360
Width = 1335
End
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "本軟件的試用期限為 30 天"
Height = 255
Left = 840
TabIndex = 8
Top = 2040
Width = 2295
End
End
Attribute VB_Name = "frm_znsb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Const MF_REMOVE = &H1000&
Private Const SC_COLSE = &HF060
Private Const SC_MAXIMIZE = &HF030
Private Const SC_MINIMIZE = &HF020
Private Sub Command1_Click()
frm_znsb.Hide
End Sub
Private Sub Form_Load()
Dim Intext, Intext1, Intext2, Intext3 As String
Dim temp, temp_sj As String
DT1.Value = Date
Open (App.Path & "\首次安裝.txt") For Input As #1
Do While Not EOF(1)
Line Input #1, Intext
Txt_temp1 = Intext
Loop
Close #1
If Txt_temp1 = "" Then '如果等于空則證明是首次安裝
DT1.Value = Date
DT_sc.Value = Date
DT2.Value = DateAdd("d", 30, DT_sc)
Open (App.Path & "\首次安裝.txt") For Output As #1
Print #1, DT_sc.Value
Close #1
Open (App.Path & "\軟件到期時間.txt") For Output As #1
Print #1, DT2.Value
Close #1
temp_sj = Str(DateDiff("d", DT1.Value, DT2.Value))
Open (App.Path & "\軟件使用天數.txt") For Output As #1
Print #1, temp_sj
Close #1
Label5.Caption = "對于本軟件 您還可以使用 " + Str(DateDiff("d", DT1.Value, DT2.Value)) + " 天"
frm_znsb.Hide
frm_czydl.Show
Else
Open (App.Path & "\首次安裝.txt") For Input As #1
Do While Not EOF(1)
Line Input #1, Intext
DT_sc.Value = Intext
Loop
Open (App.Path & "\軟件到期時間.txt") For Input As #2
Do While Not EOF(2)
Line Input #2, Intext2
DT2.Value = Intext2
Loop
Close #2
Label5.Caption = "對于本軟件 您還可以使用 " + Str(DateDiff("d", DT1.Value, DT2.Value)) + " 天"
Text2.Text = Str(DateDiff("d", DT1.Value, DT2.Value)) '天數
Open (App.Path & "\軟件使用天數(臨時).txt") For Output As #4
Print #4, Text2.Text '將天數存入臨時天數記事本文件當中
Close #4
Open (App.Path & "\軟件使用天數.txt") For Input As #5
Do While Not EOF(5)
Line Input #5, Intext3
Text1.Text = Intext3
Loop
Close #5
If Val(Trim(Text2.Text)) > Val(Trim(Text1.Text)) Then
MsgBox " 尊敬的用戶,您好!請您不要通過修改系統時間來延長本軟件的試用期時間,您這樣做是徒勞的,您只具有試用30天的權限,如果您已經修改了系統的時間,請將系統時間改為當天的真正日期,否則系統將無法再運行!!"
End
ElseIf Val(Trim(Text2.Text)) <= 0 Then
MsgBox "對不起!您對使用本軟件試用期限已到,請您退出系統"
End
Else
Text2.Text = Str(DateDiff("d", DT1.Value, DT2.Value))
Open (App.Path & "\軟件使用天數.txt") For Output As #6
Print #6, Text2.Text
Close #6
frm_znsb.Hide
frm_czydl.Show
End If
End If
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
RemoveMenu GetSystemMenu(frm_znsb.hwnd, 0), SC_COLSE, MF_REMOVE '關閉按鈕不可用
End Sub
Private Sub RichText3_Change()
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -