⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 urldialog.vb

📁 一个界面很好的iRadio收音机 一个界面很好的iRadio收音机
💻 VB
字号:
Option Explicit On
Option Strict On

Imports System.Windows.Forms

''' <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 UrlDialog

#Region " Form Events "

    Private Sub UrlDialog_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 "

    ''' <summary>
    ''' Return cancel which also closes the form.
    ''' </summary>
    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
    End Sub

    ''' <summary>
    ''' Change button border appearance when mouse enter and when it is down.
    ''' </summary>
    Private Sub btnCancel_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles btnCancel.MouseDown
        btnCancel.FlatAppearance.BorderColor = Color.DodgerBlue
    End Sub

    Private Sub btnCancel_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles btnCancel.MouseUp
        btnCancel.FlatAppearance.BorderColor = Color.Black
    End Sub

    Private Sub btnCancel_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.MouseEnter
        btnCancel.FlatAppearance.BorderColor = Color.DarkOrange
    End Sub

    Private Sub btnCancel_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.MouseLeave
        btnCancel.FlatAppearance.BorderColor = Color.Black
    End Sub

    ''' <summary>
    ''' Return ok which also closes the form.
    ''' </summary>
    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
    End Sub

    ''' <summary>
    ''' Change button border appearance when mouse enter and when it is down.
    ''' </summary>
    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_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_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.Cancel
    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 + -