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

📄 frmdemo.frm

📁 实现闪烁的标题栏
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{153B6C71-E9C5-11D1-8850-BCCD2DF3481A}#1.1#0"; "ExPropList.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmDemo 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Excalibur PropertyList Control Demo"
   ClientHeight    =   5400
   ClientLeft      =   2475
   ClientTop       =   1515
   ClientWidth     =   6285
   Icon            =   "frmDemo.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5400
   ScaleWidth      =   6285
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox picOD 
      AutoSize        =   -1  'True
      ClipControls    =   0   'False
      Height          =   300
      Left            =   1800
      Picture         =   "frmDemo.frx":000C
      ScaleHeight     =   16
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   16
      TabIndex        =   17
      Top             =   720
      Width           =   300
   End
   Begin VB.OptionButton chk 
      Caption         =   "Property Header"
      Height          =   255
      Index           =   7
      Left            =   120
      TabIndex        =   15
      Top             =   3720
      Width           =   2055
   End
   Begin VB.OptionButton chk 
      Caption         =   "Owner-Drawn"
      Height          =   255
      Index           =   6
      Left            =   120
      TabIndex        =   14
      Top             =   3480
      Width           =   2055
   End
   Begin VB.CommandButton cmdAdd 
      Caption         =   "Add Property"
      Height          =   615
      Left            =   120
      TabIndex        =   13
      Tag             =   "0"
      Top             =   4200
      Width           =   2055
   End
   Begin VB.TextBox txtValue 
      Height          =   285
      Left            =   120
      TabIndex        =   11
      Text            =   "MyPropValue"
      Top             =   1680
      Width           =   2055
   End
   Begin VB.TextBox txtName 
      Height          =   285
      Left            =   120
      TabIndex        =   9
      Text            =   "MyProperty"
      Top             =   1080
      Width           =   2055
   End
   Begin VB.OptionButton chk 
      Caption         =   "Numeric Type"
      Height          =   255
      Index           =   1
      Left            =   120
      TabIndex        =   8
      Top             =   2280
      Width           =   2055
   End
   Begin VB.OptionButton chk 
      Caption         =   "BrowseButton Type"
      Height          =   255
      Index           =   3
      Left            =   120
      TabIndex        =   7
      Top             =   2760
      Width           =   2055
   End
   Begin VB.OptionButton chk 
      Caption         =   "String Type"
      Height          =   255
      Index           =   0
      Left            =   120
      TabIndex        =   6
      Top             =   2040
      Value           =   -1  'True
      Width           =   2055
   End
   Begin VB.OptionButton chk 
      Caption         =   "Boolean Type"
      Height          =   255
      Index           =   2
      Left            =   120
      TabIndex        =   5
      Top             =   2520
      Width           =   2055
   End
   Begin VB.OptionButton chk 
      Caption         =   "Custom Fill"
      Height          =   255
      Index           =   5
      Left            =   120
      TabIndex        =   4
      Top             =   3240
      Width           =   2055
   End
   Begin VB.OptionButton chk 
      Caption         =   "Color Picker Type"
      Height          =   255
      Index           =   4
      Left            =   120
      TabIndex        =   3
      Top             =   3000
      Width           =   2055
   End
   Begin MSComDlg.CommonDialog dlg 
      Left            =   240
      Top             =   2400
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      DialogTitle     =   "Choose Picture"
      Filter          =   "All Picture Files|*.gif;*.jpg;*.bmp;*.dib;*.ico;*.wmf;*.emf"
      FontName        =   "MS Sans Serif"
   End
   Begin ExPropertyList.PropertyList prp 
      Height          =   4605
      Left            =   2280
      TabIndex        =   1
      Top             =   120
      Width           =   3885
      _ExtentX        =   6853
      _ExtentY        =   8123
      ForeColor       =   -2147483630
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty FontHeader {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Begin VB.CheckBox chkOD 
         BackColor       =   &H80000005&
         Caption         =   "1 - Visible"
         ForeColor       =   &H000000FF&
         Height          =   255
         Left            =   1200
         TabIndex        =   16
         Top             =   2760
         Value           =   1  'Checked
         Visible         =   0   'False
         Width           =   1455
      End
   End
   Begin VB.CommandButton cmdFill 
      Caption         =   "Fill PropertyList"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   2055
   End
   Begin VB.Label Label1 
      Caption         =   "Initial Value:"
      Height          =   255
      Index           =   1
      Left            =   120
      TabIndex        =   12
      Top             =   1440
      Width           =   1335
   End
   Begin VB.Label Label1 
      Caption         =   "Property Name:"
      Height          =   255
      Index           =   0
      Left            =   120
      TabIndex        =   10
      Top             =   840
      Width           =   1335
   End
   Begin VB.Label lbl 
      BorderStyle     =   1  'Fixed Single
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Top             =   4920
      Width           =   6015
   End
End
Attribute VB_Name = "frmDemo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'This form will be the owner-draw sink
'for the property list control's owner-
'drawn items.
Implements IPropOwnerDrawSink

'Some declarations we'll need for
'owner-drawn items...
Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
'Declare Function GetTextColor Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
'DrawText() Format Flags
Const DT_CENTER = &H1
Const DT_RIGHT = &H2
Const DT_VCENTER = &H4
Const DT_BOTTOM = &H8
Const DT_SINGLELINE = &H20
Const DT_EXPANDTABS = &H40
Const DT_TABSTOP = &H80
Const DT_CALCRECT = &H400
Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Private Declare Function DrawFrameControl Lib "user32" (ByVal hdc As Long, lpRect As RECT, ByVal un1 As Long, ByVal un2 As Long) As Long
'/* flags for DrawFrameControl */
Const DFC_BUTTON = 4
Const DFCS_BUTTONCHECK = &H0
Const DFCS_BUTTONRADIOIMAGE = &H1
Const DFCS_BUTTONRADIOMASK = &H2
Const DFCS_BUTTONRADIO = &H4
Const DFCS_BUTTON3STATE = &H8
Const DFCS_BUTTONPUSH = &H10

Const DFCS_INACTIVE = &H100
Const DFCS_PUSHED = &H200
Const DFCS_CHECKED = &H400

'#if(WINVER >= =&H0500)
Const DFCS_TRANSPARENT = &H800
Const DFCS_HOT = &H1000
'#endif /* WINVER >= =&H0500 */

Const DFCS_ADJUSTRECT = &H2000
Const DFCS_FLAT = &H4000
Const DFCS_MONO = &H8000

Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function FillRect Lib "user32" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) As Integer

Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Integer) As Long
Const COLOR_HIGHLIGHT = 13
Const COLOR_HIGHLIGHTTEXT = 14
Const COLOR_WINDOW = 5
Const COLOR_WINDOWTEXT = 8

Private Sub chk_Click(Index As Integer)

cmdAdd.Tag = Index

End Sub

Private Sub chkOD_Click()

'This is where we change the value of our

⌨️ 快捷键说明

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