📄 clock.frm
字号:
VERSION 5.00
Begin VB.Form clock
AutoRedraw = -1 'True
BackColor = &H00FF00FF&
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 960
ClientLeft = 7185
ClientTop = 9255
ClientWidth = 960
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "clock.frx":0000
ScaleHeight = 64
ScaleMode = 3 'Pixel
ScaleWidth = 64
Visible = 0 'False
Begin VB.Timer tmrhit
Interval = 500
Left = 0
Top = 240
End
Begin VB.Timer Timer3
Interval = 10
Left = 960
Top = 2040
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 1000
Left = 1440
Top = 720
End
Begin VB.Timer Timer1
Interval = 10
Left = 2040
Top = 720
End
Begin VB.Image Image1
Height = 975
Left = 0
Top = 0
Width = 975
End
End
Attribute VB_Name = "clock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim hit As Boolean
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
If KeyAscii = 27 Then
Msg = "Are you sure you want to Exit, " & player & "?"
Style = vbYesNo + vbExclamation + vbDefaultButton2
Title = "Exit"
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then
End
End If
End If
End Sub
Private Sub Form_Load()
frmSplash.Show
Form1.Show
AutoFormShape clock, RGB(255, 0, 255)
clock.Show 1
End Sub
Private Sub Image1_Click()
End
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If hit = False Then
james = -((X - (clock.Width / 2)) / 5)
linnegar = -((Y - (clock.Height / 2)) / 2)
tmrhit.Enabled = True
hit = True
End If
End Sub
Private Sub Timer1_Timer()
clock.Left = clock.Left + james
clock.Top = clock.Top + linnegar
End Sub
Private Sub Timer3_Timer()
If clock.Top > (Screen.Height - clock.Height) Then
linnegar = -(linnegar / 1.2)
clock.Top = (Screen.Height - clock.Height)
End If
If clock.Top < (Screen.Height - clock.Height) Then
linnegar = linnegar + 5
End If
If clock.Left < 0 Then
james = 100
End If
If clock.Left > (Screen.Width - clock.Width) Then
james = -100
End If
End Sub
Private Sub tmrhit_Timer()
clock.SetFocus
hit = False
tmrhit.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -