📄 statisticsform.vb
字号:
Option Explicit On
Option Strict On
''' <copyright>Copyright ?2006 Herbert N Swearengen III</copyright>
'''
''' <notice>
''' This application maybe freely distributed and modified as long
''' as the copyright notice and EULA are retained. This applies to
''' both the compiled application and it's source code.
''' </notice>
Public Class StatisticsForm
#Region " Form Events "
Private Sub StatisticsForm_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Escape Then
DialogResult = Windows.Forms.DialogResult.OK
End If
End Sub
Private Sub StatisticsForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' Set color.
SetColor(Me, Settings.Color)
End Sub
#End Region
#Region " pnlHeader Mouse Events - Move Form "
''' <summary>
''' Responds to the left mouse button down on pnlHeader.
''' For each movement, the form is moved correspondingly.
''' </summary>
Private Sub pnlHeader_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles pnlHeader.MouseDown
' If the left mouse is pressed, release form for movement
If e.Button = Windows.Forms.MouseButtons.Left Then
ReleaseCapture()
SendMessage(Handle, WM_NCLBUTTONDOWN, CType(HTCAPTION, UIntPtr), CType(0, UIntPtr))
End If
End Sub
#End Region
#Region " Button Events "
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
DialogResult = Windows.Forms.DialogResult.OK
End Sub
Private Sub btnOK_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles btnOK.MouseUp
btnOK.FlatAppearance.BorderColor = Color.Black
End Sub
Private Sub btnOK_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles btnOK.MouseDown
btnOK.FlatAppearance.BorderColor = Color.DodgerBlue
End Sub
Private Sub btnOK_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.MouseEnter
btnOK.FlatAppearance.BorderColor = Color.DarkOrange
End Sub
Private Sub btnOK_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.MouseLeave
btnOK.FlatAppearance.BorderColor = Color.Black
End Sub
#End Region
#Region " PictureBox Events "
Private Sub picClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picClose.Click
Me.DialogResult = Windows.Forms.DialogResult.OK
End Sub
Private Sub picClose_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles picClose.MouseEnter
picClose.Image = My.Resources.Close_Mouse_Hover
End Sub
Private Sub picClose_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles picClose.MouseLeave
picClose.Image = My.Resources.Close_Mouse_Up
End Sub
#End Region
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -