-
Notifications
You must be signed in to change notification settings - Fork 0
/
ined2.frm
191 lines (179 loc) · 5.52 KB
/
ined2.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
VERSION 5.00
Begin VB.Form Form3
BorderStyle = 1 '單線固定
ClientHeight = 2625
ClientLeft = 12660
ClientTop = 6645
ClientWidth = 3900
ControlBox = 0 'False
BeginProperty Font
Name = "微軟正黑體"
Size = 9
Charset = 136
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 2625
ScaleWidth = 3900
ShowInTaskbar = 0 'False
Begin VB.Timer Timer1
Interval = 1
Left = 240
Top = 840
End
Begin VB.CommandButton Command3
Caption = "計時"
Height = 375
Left = 720
TabIndex = 5
Top = 1560
Width = 2295
End
Begin VB.CommandButton Command2
Caption = "停止"
Height = 375
Left = 720
TabIndex = 4
Top = 1320
Visible = 0 'False
Width = 2295
End
Begin VB.TextBox Text1
Height = 375
Left = 480
TabIndex = 3
Top = 2160
Visible = 0 'False
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "查詢剩餘時間"
Height = 375
Left = 720
TabIndex = 2
Top = 1080
Width = 2295
End
Begin VB.Label Label3
Height = 255
Left = 480
TabIndex = 6
Top = 2160
Visible = 0 'False
Width = 2775
End
Begin VB.Label Label2
Alignment = 1 '靠右對齊
Caption = "還有"
Height = 375
Left = 360
TabIndex = 1
Top = 240
Visible = 0 'False
Width = 1335
End
Begin VB.Label Label1
Caption = "00:00:00"
Height = 375
Left = 1800
TabIndex = 0
Top = 240
Visible = 0 'False
Width = 1695
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetPrivateProfileString Lib "kernel32" _
Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, _
ByVal lpKeyName As Any, ByVal lpDefault As String, _
ByVal lpReturnedString As String, ByVal nSize As Long, _
ByVal lpFileName As String) As Long
Private Declare Function WritePrivateProfileString Lib "kernel32" _
Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, _
ByVal lpKeyName As Any, ByVal lpString As Any, _
ByVal lpFileName As String) As Long
Private Sub Timer1_Timer()
Dim de As Date
de = Now
Form3.Caption = "時間主控台 - " & de
Label3.Caption = de
End Sub
Private Sub Form_Load()
Dim ret As Long
Dim buff As String
buff = String(255, 0)
ret = GetPrivateProfileString("InED", "Box2N", "", buff, 256, "C:\ined.ini")
Text1.Text = buff
If buff = "00:00:00" Then
Label2.Caption = "時間已用完"
Label1.Visible = False
End If
MsgBox "請按使用剩餘時間/計時按鈕", 32, "注意"
End Sub
Private Sub Command2_Click()
Dim a As Long, y As Double
a = WritePrivateProfileString("InED", "Box2N", Label1.Caption, "C:\ined.ini")
y = WritePrivateProfileString("InED", "Box3N", Label3.Caption, "C:\ined.ini")
MsgBox "管理員會查看記錄,一但發現作弊,將會被凍結帳號", 32, "注意"
End
End Sub
Private Sub Command3_Click()
Me.Top = 15195
Me.Left = 19200
Form4.Show
Command2.Visible = True
Command1.Visible = False
Command3.Visible = False
End Sub
Private Sub Command1_Click()
Label1.Visible = True
Label2.Visible = False
Form4.Show
Me.Top = 15195
Me.Left = 19200
Command1.Visible = False
Command2.Visible = True
Command3.Visible = False
Dim BeforeTime As Single
Static InDo As Boolean
InDo = Not InDo
If InDo Then
If Not IsDate(Text1) Then
Else
BeforeTime = Timer
Text1.Enabled = False
Label1 = Format(Text1, "hh:mm:ss")
Do While Label1 <> "00:00:00"
If Not InDo Then Exit Do
If Timer >= BeforeTime + 1 Then
BeforeTime = Timer
Label1 = Format(DateAdd("s", -1, Label1), "hh:mm:ss")
End If
DoEvents
Loop
End If
InDo = False
End If
If Label1.Caption = "00:00:00" Then
Me.Top = 1350
Me.Left = 1350
Dim k As Long
k = MsgBox("剩餘時間已經完結,請與管理員聯絡購買", 4096, "特別注意")
If k = 1 Then
Dim r As Long
r = WritePrivateProfileString("InED", "Box2N", "00:00:00", "C:\ined.ini")
'Shell "shutdown -s -f -t 120 "
End
End If
End If
End Sub