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

📄 testbutton.frm

📁 这是一个教育系统的源码许多人都是从写这种学生管理系统而进入编程界的,所以我觉得初学者应该多学习一下本源码的语法,与设计思想,感谢为中国软件业贡献的人们!
💻 FRM
字号:
VERSION 5.00
Object = "{94E73430-7675-11D3-9090-BA68361D7B05}#3.0#0"; "Fancy_Button.ocx"
Begin VB.Form frmTestButton 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Welcome"
   ClientHeight    =   6585
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6570
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "TestButton.frx":0000
   ScaleHeight     =   439
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   438
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin Fancy_Button.Button Button1 
      Height          =   900
      Left            =   4410
      TabIndex        =   0
      Top             =   3420
      Width           =   1995
      _ExtentX        =   3519
      _ExtentY        =   1588
      BackColor       =   49344
      ForeColor       =   65280
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Courier"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "Invert"
      TextColor       =   192
      FontBold        =   -1  'True
      FontName        =   "Courier"
      FontSize        =   12
   End
   Begin Fancy_Button.Button Button2 
      Height          =   900
      Left            =   4410
      TabIndex        =   2
      Top             =   5400
      Width           =   1995
      _ExtentX        =   3519
      _ExtentY        =   1588
      BackColor       =   49344
      ForeColor       =   65280
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Courier"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "Exit"
      TextColor       =   192
      FontBold        =   -1  'True
      FontName        =   "Courier"
      FontSize        =   12
   End
   Begin Fancy_Button.Button Button3 
      Height          =   900
      Left            =   4410
      TabIndex        =   1
      Top             =   4417
      Width           =   1995
      _ExtentX        =   3519
      _ExtentY        =   1588
      BackColor       =   49344
      ForeColor       =   65280
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Courier"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "Preview"
      TextColor       =   192
      FontBold        =   -1  'True
      FontName        =   "Courier"
      FontSize        =   12
   End
   Begin VB.Shape Mask 
      DrawMode        =   6  'Mask Pen Not
      FillStyle       =   0  'Solid
      Height          =   75
      Left            =   4590
      Top             =   3870
      Visible         =   0   'False
      Width           =   1590
   End
End
Attribute VB_Name = "frmTestButton"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Written By : Ejaz Ahmad Qureshi
' This is very simple application  to use Fancy Buttons
' No more simple Command Buttons
' Freeware  with source code
' use this fancy button in your applications
' Match Bitmap color with button color
Private Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Private Declare Function SetPixelV Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long

Private Sub Button1_Click()
If Mask.Visible Then
    Mask.Visible = False
Else
    Mask.DrawMode = vbInvert
    Mask.Visible = True
End If
End Sub

Private Sub Button2_Click()
Unload Me
End Sub

Private Sub Form_Load()
    Mask.Top = 0
    Mask.Left = 0
    Mask.Width = ScaleWidth
    Mask.Height = ScaleHeight
    Mask.FillStyle = 0
    Mask.Visible = False
End Sub

⌨️ 快捷键说明

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