-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBackGround.vb
More file actions
26 lines (26 loc) · 937 Bytes
/
BackGround.vb
File metadata and controls
26 lines (26 loc) · 937 Bytes
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
Public Class BackGround
Private time As Integer = 0
Private Sub Loading(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Size = New Size(screenw, screenh)
MaximumSize = Size
MinimumSize = Size
End Sub
Private Sub SelfDeactivate(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Deactivate
Activate()
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer.Tick
time += 1
Dim sec As Byte = time Mod 60
Dim min As Byte = time \ 60
Label.Text = "時間:" + TimeFormat(min) + " 分 " + TimeFormat(sec) + " 秒"
End Sub
Private Function TimeFormat(ByVal t) As String
Dim strReturn As String
If t < 10 Then
strReturn = "0" + t.ToString()
Else
strReturn = t.ToString()
End If
Return strReturn
End Function
End Class