📄 cricle_screensaver.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00000000&
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 0
ClientTop = 0
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Visible = 0 'False
WindowState = 2 'Maximized
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 500
Left = 1755
Top = 1350
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Dim Qflag As Boolean
Private Sub Form_Click()
Quit
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Quit
End Sub
Private Sub Form_Load()
Randomize
If App.PrevInstance Then
Unload Me
Exit Sub
End If
Select Case UCase(Left(Command, 2))
Case "/S" '单击预览按钮或系统正常调用
Show
Randomize
ShowCursor False
Form1.Visible = True
Timer1.Enabled = True
Case "/C" '单击设置按钮,/A单击改变口令按钮,/P在对话框显示预览效果
Form2.Show
Case Else
End
End Select
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static xLast As Single
Static yLast As Single
If xLast = 0 Then
xLast = X
yLast = Y
Exit Sub
End If
If X <> xLast Or Y <> yLast Then
Quit
End If
End Sub
Private Sub Timer1_Timer()
Static Color As Long
Static Num As Long
Dim X As Single
Dim Y As Single
Dim X1 As Single
Dim Y1 As Single
Dim Radius As Single
If Num > 10 Then
Form1.DrawMode = 14
End If
If Num > 50 Then
Form1.Refresh
Num = 0
Form1.DrawMode = 13
End If
Color = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
X = Int((ScaleWidth - ScaleWidth / 20) * Rnd + ScaleWidth / 20)
Y = Int((ScaleHeight - ScaleHeight / 20) * Rnd + ScaleWidth / 20)
DrawWidth = Int((50 - 20) * Rnd + 20)
Select Case blankType
Case 0
Radius = Int((ScaleWidth / 2 - ScaleWidth / 20) * Rnd + ScaleWidth / 20)
Circle (X, Y), Radius, Color
Case 1
X1 = Int((ScaleWidth - ScaleWidth / 20) * Rnd + ScaleWidth / 20)
Y1 = Int((ScaleHeight - ScaleHeight / 20) * Rnd + ScaleHeight / 20)
Line (X, Y)-(X1, Y1), Color, BF
Case 2
X1 = Int((ScaleWidth - ScaleWidth / 20) * Rnd + ScaleWidth / 20)
Y1 = Int((ScaleHeight - ScaleHeight / 20) * Rnd + ScaleHeight / 20)
Line (X, Y)-(X1, Y1), Color
End Select
Num = Num + 1
End Sub
Private Sub Quit()
ShowCursor True
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -