📄 form2.frm
字号:
Top = 2040
Width = 4695
End
Begin VB.Label E_mailLabel
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "Maill:cloudangel@163.com"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 2880
MouseIcon = "Form2.frx":AB3B0
MousePointer = 99 'Custom
TabIndex = 8
Top = 3120
Width = 2295
End
Begin VB.Label HttpLabel
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "Http://soft.buaa.edu.cn"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 600
MouseIcon = "Form2.frx":AB6BA
MousePointer = 99 'Custom
TabIndex = 7
Top = 3120
Width = 2175
End
Begin VB.Image AuthorImage
Height = 1440
Left = 600
Picture = "Form2.frx":AB9C4
Top = 1920
Width = 1440
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Const SW_SHOW = 5
'在本界面中原本完全可以不使用图片作为界面使用的,用Label控制就可以了。
'但我用过之后,本电脑上显示出来的界面效果不错,但程序放在另一台电脑上时,界面效果完全变了样。
'使我不得不得改用图片形式来显示界面。使用VB设置界面的人可能就会有此体会。
Private Sub AuthorButton_Click()
StartHelp.Visible = False
TestHelp.Visible = False
Off_OnHelp.Visible = False
TimeHelp.Visible = False
OtherHelp.Visible = False
StartButton.Visible = True
TimeButton.Visible = True
Off_OnButton.Visible = True
TestButton.Visible = True
OtherButton.Visible = True
AuthorButton.Visible = False
StartButton.SetFocus
End Sub
Private Sub Form_Load()
TitleBar.Width = Form2.ScaleWidth
TitleBar.Top = 0
TitleBar.Left = 0
Picture1.Left = TitleBar.Width - Picture1.Width - 100
Picture1.Top = 25
StartHelp.Top = 2040
StartHelp.Left = 360
StartHelp.Visible = True
TestHelp.Top = 2150
TestHelp.Left = 360
TestHelp.Visible = False
Off_OnHelp.Top = 2100
Off_OnHelp.Left = 360
Off_OnHelp.Visible = False
TimeHelp.Top = 2040
TimeHelp.Left = 360
TimeHelp.Visible = False
OtherHelp.Top = 2040
OtherHelp.Left = 360
OtherHelp.Visible = False
StartButton.Visible = False
End Sub
'隐藏四个边框
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
ButBorder(0).Visible = False
ButBorder(1).Visible = False
ButBorder(2).Visible = False
ButBorder(3).Visible = False
End Sub
Private Sub ExitImage_Click()
Form2.Visible = False
End Sub
'显示四个边框
Private Sub exitImage_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
ButBorder(0).Visible = True
ButBorder(1).Visible = True
ButBorder(2).Visible = True
ButBorder(3).Visible = True
End Sub
Private Sub HttpLabel_Click()
HttpLabel.ForeColor = &H800080
Call ShellExecute(Me.hwnd, "open", "http://soft.buaa.edu.cn", "", "", SW_SHOW)
End Sub
Private Sub E_mailLabel_Click()
E_mailLabel.ForeColor = &H800080
Call ShellExecute(Me.hwnd, "open", "mailto:cloudangel@163.com", "", "", SW_SHOW)
End Sub
Private Sub Off_OnButton_Click()
StartHelp.Visible = False
TestHelp.Visible = False
Off_OnHelp.Visible = True
TimeHelp.Visible = False
OtherHelp.Visible = False
StartButton.Visible = True
TimeButton.Visible = True
Off_OnButton.Visible = False
TestButton.Visible = True
OtherButton.Visible = True
AuthorButton.Visible = True
TestButton.SetFocus
End Sub
Private Sub OtherButton_Click()
StartHelp.Visible = False
TestHelp.Visible = False
Off_OnHelp.Visible = False
TimeHelp.Visible = False
OtherHelp.Visible = True
StartButton.Visible = True
TimeButton.Visible = True
Off_OnButton.Visible = True
TestButton.Visible = True
OtherButton.Visible = False
AuthorButton.Visible = True
AuthorButton.SetFocus
End Sub
Private Sub StartButton_Click()
StartHelp.Visible = True
TestHelp.Visible = False
Off_OnHelp.Visible = False
TimeHelp.Visible = False
OtherHelp.Visible = False
StartButton.Visible = False
TimeButton.Visible = True
Off_OnButton.Visible = True
TestButton.Visible = True
OtherButton.Visible = True
AuthorButton.Visible = True
TimeButton.SetFocus
End Sub
Private Sub TestButton_Click()
StartHelp.Visible = False
TestHelp.Visible = True
Off_OnHelp.Visible = False
TimeHelp.Visible = False
OtherHelp.Visible = False
StartButton.Visible = True
TimeButton.Visible = True
Off_OnButton.Visible = True
TestButton.Visible = False
OtherButton.Visible = True
AuthorButton.Visible = True
OtherButton.SetFocus
End Sub
Private Sub TimeButton_Click()
StartHelp.Visible = False
TestHelp.Visible = False
Off_OnHelp.Visible = False
TimeHelp.Visible = True
OtherHelp.Visible = False
StartButton.Visible = True
TimeButton.Visible = False
Off_OnButton.Visible = True
TestButton.Visible = True
OtherButton.Visible = True
AuthorButton.Visible = True
Off_OnButton.SetFocus
End Sub
Private Sub TitleBar_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoDrag Me
End Sub
'隐藏四个边框
Private Sub TitleBar_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
ButBorder(0).Visible = False
ButBorder(1).Visible = False
ButBorder(2).Visible = False
ButBorder(3).Visible = False
End Sub
Private Sub TitleBarCaption_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoDrag Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -