📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form form1
BorderStyle = 1 'Fixed Single
Caption = "自动更换墙纸"
ClientHeight = 1485
ClientLeft = 45
ClientTop = 330
ClientWidth = 3705
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1485
ScaleWidth = 3705
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退出"
Height = 345
Left = 750
TabIndex = 1
Top = 810
Width = 2145
End
Begin VB.CommandButton Command1
Caption = "自动更换墙纸"
Height = 345
Left = 720
TabIndex = 0
Top = 360
Width = 2145
End
Begin VB.Timer Timer1
Interval = 900
Left = 720
Top = 780
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 SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _
(ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, _
ByVal fuWinIni As Long) As Long
Dim mystr As String
Dim i As Integer
Private Sub Command1_Click()
Dim t As Long
Randomize
i = Int((6 * Rnd) + 1)
mystr = App.Path & "\mywallpaper\mywallpaper" & i & ".bmp" '载入墙纸图片
t = SystemParametersInfo(ByVal 20, vbnostring, ByVal mystr, &H1) '设置墙纸
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -