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

📄 cmdbutton.vb

📁 《ViSUAL BASIC》设计模式
💻 VB
字号:
Imports System.ComponentModel
Imports System.Drawing
Imports System.WinForms


Public Class cmdButton
    Inherits System.WinForms.Button
    Implements CommandHolder
    Private cmd As Command
    Public Sub New()
        MyBase.New()
        
        'This call is required by the Win Form Designer.
        InitializeComponent()
        
    End Sub
    
    'UserControl1 overrides dispose to clean up the component list.
    Public Overrides Sub Dispose()
        MyBase.Dispose()
        components.Dispose()
    End Sub
    
#Region " Windows Form Designer generated code "
    
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.Container
    
    Dim WithEvents cmdButton As System.WinForms.UserControl
    
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Private Sub InitializeComponent()
        components = New System.ComponentModel.Container()
    End Sub
    
#End Region
    Public Sub setCommand(ByVal comd As Command)
        cmd = comd
    End Sub
    Public Function getCommand() As Command Implements CommandHolder.getCommand
        Return cmd
    End Function
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -