📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form Form2
AutoRedraw = -1 'True
BorderStyle = 0 'None
ClientHeight = 1485
ClientLeft = 12105
ClientTop = 315
ClientWidth = 2595
ControlBox = 0 'False
DrawStyle = 1 'Dash
FillStyle = 0 'Solid
ForeColor = &H8000000E&
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "Form2.frx":0000
ScaleHeight = 1485
ScaleWidth = 2595
ShowInTaskbar = 0 'False
Begin VB.Timer Timer1
Left = 0
Top = 0
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 1215
Left = 120
TabIndex = 0
Top = 360
Width = 2535
End
Begin VB.Image Image1
Height = 1530
Left = 0
Picture = "Form2.frx":146D
Stretch = -1 'True
Top = 0
Width = 2610
End
Begin VB.Menu c
Caption = "右键"
Visible = 0 'False
Begin VB.Menu c1
Caption = "设置时间"
End
Begin VB.Menu c2
Caption = "隐藏"
End
Begin VB.Menu ca
Caption = "-"
End
Begin VB.Menu c3
Caption = "背景"
Begin VB.Menu c31
Caption = "主席"
End
Begin VB.Menu c32
Caption = "粉红百合"
End
Begin VB.Menu c33
Caption = "海底生物"
End
Begin VB.Menu c34
Caption = "灰色金属"
End
Begin VB.Menu c35
Caption = "简单兰色"
End
Begin VB.Menu c36
Caption = "丛林精灵"
End
Begin VB.Menu c37
Caption = "绿意盎然"
End
Begin VB.Menu c38
Caption = "热带雨林"
End
Begin VB.Menu c39
Caption = "大眼睛"
End
Begin VB.Menu c310
Caption = "兰色群山"
End
Begin VB.Menu c311
Caption = "蝎子"
End
End
Begin VB.Menu cb
Caption = "-"
End
Begin VB.Menu c4
Caption = "退出"
End
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub c1_Click()
Form1.Visible = True '显示Form1
End Sub
Private Sub c2_Click()
Form2.Visible = False '隐藏Form2
Form1.Show
Form1.WindowState = 1
End Sub
Private Sub c31_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\主席.jpg")
Label1.ForeColor = &H8000000E
End Sub
Private Sub c310_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\兰色群山.jpg")
Label1.ForeColor = &H8000000E
End Sub
Private Sub c311_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\蝎子.jpg")
Label1.ForeColor = &H808080
End Sub
Private Sub c32_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\粉红百合.bmp")
Label1.ForeColor = &H8000000E
End Sub
Private Sub c33_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\海底生物.bmp")
Label1.ForeColor = &H0&
End Sub
Private Sub c34_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\灰色金属.bmp")
Label1.ForeColor = &H404040
End Sub
Private Sub c35_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\简单兰色.bmp")
Label1.ForeColor = &HFF0000
End Sub
Private Sub c36_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\丛林精灵.bmp")
Label1.ForeColor = &HFF00&
End Sub
Private Sub c38_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\热带雨林.bmp")
Label1.ForeColor = &HC0FFC0
End Sub
Private Sub c39_Click()
Image1.Picture = LoadPicture(App.Path + "\图片\大眼睛.jpg")
Label1.ForeColor = &HFF00&
End Sub
Private Sub c4_Click()
End '结束程序
End Sub
Private Sub Form_Load()
Label1.Caption = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日星期" & GetWD(Weekday(Date)) & Format$(Time, "hh:mm:ss")
Timer1.Interval = 500 '在Label1中显示系统日期时间
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu c '右键弹出菜单
End If
End Sub
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu c '右键弹出菜单,补充空隙
End If
End Sub
Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu c '右键弹出菜单,补充空隙
End If
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日星期" & GetWD(Weekday(Date)) & Format$(Time, "hh:mm:ss") '在Label1上显示系统日期时间
End Sub
Function GetWD(ByVal Week As Integer) As String
Select Case Week
Case 1 '编辑当前星期几
GetWD = "日 "
Case 2
GetWD = "一 "
Case 3
GetWD = "二 "
Case 4
GetWD = "三 "
Case 5
GetWD = "四 "
Case 6
GetWD = "五 "
Case 7
GetWD = "六 "
End Select
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -