📄 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 m_About
BorderStyle = 0 'Kein
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
TabStop = 0 'False
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
'CSEH: ErrExitMember
'*************************************************************
'
' Control Name: isButton
'
' Author: Fred.cpp
' fred_cpp@gmail.com
'
' Page: http://mx.geocities.com/fred_cpp/
'
' Current
' Version: 3.5.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:
' http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=51271&lngWId=1
' 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?
'
' 2005-7-4
' Version: 3.4.1 Fixed Black Icons when using BMP's,
' Removed pMask (Thanks to teee_eeee), Added CustomRegion
' Support by Theme (Thanks to Dana Seaman)
'
' 2005-7-5
' Version 3.4.2 Code Clean Up and Now Working Default and
' Cancel properties, Error Handling in all routines, fixed
' Keyboard events (Done by Aldo Vargas at: 7/4/2005-15:59:11)
'
' 2005-7-5
' Version 3.5.0 Multiline Caption Added. Corrected Java Rects
' Added Custom Offset for text and Icons for each Style
'
Option Explicit
'*************************************************************
'
' Control Version:
'
Private Const strCurrentVersion = "3.5.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_INFOTEXT As Long = 23
Private Const COLOR_INFOBK As Long = 24
Private Const BDR_RAISEDOUTER As Long = &H1
Private Const BDR_SUNKENOUTER As Long = &H2
Private Const BDR_RAISEDINNER As Long = &H4
Private Const BDR_SUNKENINNER As Long = &H8
Private Const EDGE_RAISED = (BDR_RAISEDOUTER Or BDR_RAISEDINNER)
Private Const EDGE_SUNKEN = (BDR_SUNKENOUTER Or BDR_SUNKENINNER)
Private Const BF_LEFT As Long = &H1
Private Const BF_TOP As Long = &H2
Private Const BF_RIGHT As Long = &H4
Private Const BF_BOTTOM As Long = &H8
Private Const BF_RECT As Long = (BF_LEFT Or BF_TOP Or BF_RIGHT Or BF_BOTTOM)
'Windows Messages
'Private Const WM_LBUTTONDBLCLK As Long = &H203
'Private Const WM_RBUTTONDBLCLK As Long = &H206
'Private Const WM_LBUTTONDOWN As Long = &H201
'Private Const WM_RBUTTONDOWN As Long = &H204
Private Const WM_MOUSEMOVE As Long = &H200
Private Const WM_MOUSELEAVE As Long = &H2A3
'Private Const WM_MOVING As Long = &H216
'Private Const WM_SIZING As Long = &H214
'Private Const WM_EXITSIZEMOVE As Long = &H232
Private Const WM_THEMECHANGED As Long = &H31A
Private Const WM_SYSCOLORCHANGE As Long = &H15
Private Const WM_USER As Long = &H400
Private Const GWL_STYLE As Long = -16
Private Const WS_CAPTION As Long = &HC00000
Private Const WS_THICKFRAME As Long = &H40000
'Private Const WS_SYSMENU As Long = &H80000
Private Const WS_MINIMIZEBOX As Long = &H20000
Private Const SWP_REFRESH As Long = (&H1 Or &H2 Or &H4 Or &H20)
'Private Const WS_EX_TOOLWINDOW As Long = &H80
'Private Const GWL_EXSTYLE As Long = -20
'Private Const SW_SHOWDEFAULT As Long = 10
'Private Const SW_SHOWMAXIMIZED As Long = 3
'Private Const SW_SHOWMINIMIZED As Long = 2
'Private Const SW_SHOWMINNOACTIVE As Long = 7
'Private Const SW_SHOWNA As Long = 8
'Private Const SW_SHOWNOACTIVATE As Long = 4
'Private Const SW_SHOWNORMAL As Long = 1
'Private Const SWP_FRAMECHANGED As Long = &H20
'Private Const SWP_DRAWFRAME As Long = SWP_FRAMECHANGED
'Private Const SWP_HIDEWINDOW As Long = &H80
Private Const SWP_NOACTIVATE As Long = &H10
'Private Const SWP_NOCOPYBITS As Long = &H100
Private Const SWP_NOMOVE As Long = &H2
'Private Const SWP_NOOWNERZORDER As Long = &H200
'Private Const SWP_NOREDRAW As Long = &H8
'Private Const SWP_NOREPOSITION As Long = SWP_NOOWNERZORDER
Private Const SWP_NOSIZE As Long = &H1
'Private Const SWP_NOZORDER As Long = &H4
Private Const SWP_SHOWWINDOW As Long = &H40
Private Const HWND_TOPMOST As Long = -&H1
Private Const CW_USEDEFAULT As Long = &H80000000
'Private Const RGN_AND As Long = &H1
'Private Const RGN_OR As Long = &H2
'Private Const RGN_XOR As Long = &H3
'Private Const RGN_DIFF As Long = &H4
'Private Const RGN_COPY As Long = &H5
'Private Const DST_BITMAP As Long = &H4
'Private Const DST_COMPLEX As Long = &H0
'Private Const DST_ICON As Long = &H3
'Private Const DSS_MONO As Long = &H80
'Private Const DSS_NORMAL As Long = &H0
'Private Const NULLREGION As Long = &H1 'Empty region
'Private Const SIMPLEREGION As Long = &H2 'Rectangle Region
'Private Const COMPLEXREGION As Long = &H3 'The region is complex
'Constants for nPolyFillMode in CreatePolygonRgn y CreatePolyPolygonRgn:
Private Const ALTERNATE As Long = 1
'Private Const WINDING As Long = 2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -