📄 isbutton.ctl
字号:
VERSION 5.00
Begin VB.UserControl isButton
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
ClientHeight = 1455
ClientLeft = 0
ClientTop = 0
ClientWidth = 3435
DefaultCancel = -1 'True
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ScaleHeight = 97
ScaleMode = 3 'Pixel
ScaleWidth = 229
ToolboxBitmap = "isButton.ctx":0000
Begin VB.PictureBox pMask
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 495
Left = -1800
ScaleHeight = 33
ScaleMode = 3 'Pixel
ScaleWidth = 33
TabIndex = 1
Top = 720
Width = 495
End
Begin VB.PictureBox m_About
BorderStyle = 0 'None
BeginProperty Font
Name = "Verdana"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2175
Left = 7440
ScaleHeight = 2175
ScaleWidth = 5655
TabIndex = 0
Top = 6240
Width = 5655
End
End
Attribute VB_Name = "isButton"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'*************************************************************
'
' Control Name: isButton
'
' Author: Fred.cpp
' fred_cpp@gmail.com
'
' Page: http://mx.geocities.com/fred_cpp/
'
' Current
' Version: 3.4.0
'
' Description: Multy Style Command Button. Made from scratch,
' API drawn.
' I started this project almost 5 years ago, I've
' learned a lot since then, I think this version
' Is the first one that can be used In real world,
' I've keep this control for my own use for a
' long Time, But I've used It for personal
' projects, The only one public release was here:
' I Used It here cuz there was not too much to
' show then. Afther some months I feel like I
' could make the final Version, So Here I am.
' I hope you like It And If you find It useful
' please vote, leave comments and suggestions,
' Everything Is wellcome.
' Best Regards.
'
' Started on: 6-6-2004
'
' 2004-12-6
' Added Soft, Flat, java and Office XP Style
'
' 2004-18-6
' Added Windows XP style
'
' 2004-20-6
' Enhanced Office XP Style
'
' 2004-2-7
' Code Clean Up. Removed Timer, Now Uses the
' Paul Caton's self subclaser
'
' 2004-3-7
' Added Windows Themed Style
'
' 2004-4-7
' Added Galaxy style
'
' 2004-7-7
' Added Enabled/ShowFocus and Custom Colors
'
' 2004-8-7
' Added Plastik Style
'
' 2004-14-7
' Added Keramik Style
'
' 2004-15-7
' Added Multyple styles for Tooltips!
'
' 2004-19-7
' Added Custom WinXP Colors, Disabled State
' for the WinXP style(Normal and custom colors)
'
' 2004-20-7
' Added Mac OSX Style
'
' 2004-24-7
' Keramik Rewritten from scratch
'
' 2004-3-9
' Afther some weeks of inactivity added disabled state for
' plastik and keramik styles
'
' 2004-6-9
' Added a nice About box without a extra form!
' Also some corrections to the MAc OSX Style, But still
' needs more work.
'
' 2004-7-9
' PSC downloads are down. The post was deleted when I tried
' to update. I'm trying to make some improvements to the
' MAc OSX Style, but Nothing too important. just a bugfix
' with the disabled state.
'
' 2004-8-9
' Added font property, also tooltips info is not reseted
' each run. Thanks to the comments of the PSC users I have
' lot of things to improve!
'
' 2004-10-9
' OK, Lot, I mean LOT of suggestions, I would love to be at
' school when I had enought time to code (And I was young
' and was able to sleep one or two hours per day=( )
'
' 2004-12-9
' added font and small offsets for each button style. Also
' Enum names are fixed.
'
' 2004-15-9
' Version 3.0 The last one. added CheckBox Type and value
' property. maybe some Other smal fixes will be made
' soon...maybe.
' Have fun
'
' 2005-27-6
' Version 3.2 The previous was not the last one...
' 3.1 was ActiveX version, this one is usercontrol again.
' A Lot of Bugfixes. Tooltips now are not duplicated (also,
' some memory leaks fixed)
'
' 2005-28-6
' Version 3.3
' Added grayscaled icons for disabled icons
' Also fixed textgrayed when Icon was over the text.
' Thanks to Dennis (dvrdsr)
'
' 2005-1-7
' Version 3.4 Added grayscaled for BMP's when disabled
' (used a Different method). Tooltips bug Fixed forever
' (I really really hope so) Trying to implement Default
' And Cancel properties, but VB not cooperating :)
' some help?
'
' The code starts Here!
Option Explicit
'*************************************************************
'
' Control Version:
'
Private Const strCurrentVersion = "3.4.0"
'**************************************
'*************************************************************
'
' Private Constants
'
'**************************************
'Auxiliar Constants
Private Const COLOR_ACTIVEBORDER As Long = 10
Private Const COLOR_ACTIVECAPTION As Long = 2
Private Const COLOR_ADJ_MAX As Long = 100
Private Const COLOR_ADJ_MIN As Long = -100
Private Const COLOR_APPWORKSPACE As Long = 12
Private Const COLOR_BACKGROUND As Long = 1
Private Const COLOR_BTNFACE As Long = 15
Private Const COLOR_BTNHIGHLIGHT As Long = 20
Private Const COLOR_BTNSHADOW As Long = 16
Private Const COLOR_BTNTEXT As Long = 18
Private Const COLOR_CAPTIONTEXT As Long = 9
Private Const COLOR_GRAYTEXT As Long = 17
Private Const COLOR_HIGHLIGHT As Long = 13
Private Const COLOR_HIGHLIGHTTEXT As Long = 14
Private Const COLOR_INACTIVEBORDER As Long = 11
Private Const COLOR_INACTIVECAPTION As Long = 3
Private Const COLOR_INACTIVECAPTIONTEXT As Long = 19
Private Const COLOR_MENU As Long = 4
Private Const COLOR_MENUTEXT As Long = 7
Private Const COLOR_SCROLLBAR As Long = 0
Private Const COLOR_WINDOW As Long = 5
Private Const COLOR_WINDOWFRAME As Long = 6
Private Const COLOR_WINDOWTEXT As Long = 8
Private Const COLOR_INFOTEXT As Long = 23
Private Const COLOR_INFOBK As Long = 24
'Gradient Constants
Private Const GRADIENT_FILL_RECT_H As Long = &H0
Private Const GRADIENT_FILL_RECT_V As Long = &H1
Private Const GRADIENT_FILL_TRIANGLE As Long = &H2
Private Const GRADIENT_FILL_OP_FLAG As Long = &HFF
' flags for DrawFrameControl
Private Const DFC_CAPTION As Long = 1 'Title bar
Private Const DFC_MENU As Long = 2 'Menu
Private Const DFC_SCROLL As Long = 3 'Scroll bar
Private Const DFC_BUTTON As Long = 4 'Standard button
Private Const DFCS_CAPTIONCLOSE As Long = &H0 'Close button
Private Const DFCS_CAPTIONMIN As Long = &H1 'Minimize button
Private Const DFCS_CAPTIONMAX As Long = &H2 'Maximize button
Private Const DFCS_CAPTIONRESTORE As Long = &H3 'Restore button
Private Const DFCS_CAPTIONHELP As Long = &H4 'Windows 95 only: Help button
Private Const DFCS_MENUARROW As Long = &H0 'Submenu arrow
Private Const DFCS_MENUCHECK As Long = &H1 'Check mark
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -