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

📄 clswndcoolmenu.cls

📁 入侵检测是近几年发展起来的新型网络安全策略
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsWndCoolMenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居汉化收藏整理
'发布日期:2006/12/23
'描    述:非常专业的防火墙源代码
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
'''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''
''  WndCoolMenu Class v1.3
''
''  Copyright Olivier Martin 2000
''
''  martin.olivier@bigfoot.com
''
''  This class is used to keep information on
''  each of the subclassed windows.
''
'''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private mvarPrevProc                As Long 'local copy
Private mvarhWnd                    As Long 'local copy
Private mvarSCMainMenu              As Long
Private mvarMenuHeads()             As Long
Private mvarHelpCB                  As clsHelpCallBack
Private m_MenuFont                  As Long 'Font used in menus
Private m_MenuFontSep               As Long 'Font used on separators
Private m_sFontName                 As String 'Font face name (no null)
Private m_FontSize                  As Long 'Font size
Private m_ForeColor                 As Long 'Color used for the unselected menu items
Private m_bColorEmbossed            As Boolean 'draws disabled images in colore
Private m_bRightToLeft              As Boolean 'draws text from right to left
Private m_FullSelect                As Boolean 'Selection is a bar or just text
Private m_SelectColor               As Long 'Color of the selection bar or text
Private m_bComplexRadioAndCheck     As Boolean 'Draw complex radio and check boxes
Private iMainPopedIndex             As Integer 'last poped main menu element
Public Property Let hwnd(ByVal vData As Long)
    mvarhWnd = vData
End Property
Public Property Get hwnd() As Long
    hwnd = mvarhWnd
End Property
Public Property Let PrevProc(ByVal vData As Long)
    mvarPrevProc = vData
End Property
Public Property Get PrevProc() As Long
    PrevProc = mvarPrevProc
End Property
Public Function CountMenuHeads() As Long
    CountMenuHeads = UBound(mvarMenuHeads)
End Function
Public Sub AddMenuHead(ByVal hMenu As Long)
    Dim i                           As Integer
    Dim Bound                       As Integer
    Bound% = UBound(mvarMenuHeads)
    For i% = 0 To Bound%
        If mvarMenuHeads(i%) = hMenu Then Exit Sub
    Next i%
    ReDim Preserve mvarMenuHeads(0 To Bound% + 1) As Long
    mvarMenuHeads(Bound%) = hMenu
End Sub
Public Function GetMenuHead(ByVal HeadIndex As Long) As Long
    GetMenuHead = 0
    If UBound(mvarMenuHeads) >= HeadIndex Then GetMenuHead = mvarMenuHeads(HeadIndex)
End Function
Public Property Set HelpObj(ByVal vData As clsHelpCallBack)
    Set mvarHelpCB = vData
End Property
Public Property Get HelpObj() As clsHelpCallBack
    Set HelpObj = mvarHelpCB
End Property
Private Sub Class_Initialize()
    ReDim mvarMenuHeads(0 To 0) As Long
    mvarSCMainMenu = 0&
    iMainPopedIndex = -1
    m_FontSize& = 8& 'Default value (8&)
    m_FullSelect = True 'Default value (True)
    m_bRightToLeft = False
    m_bComplexRadioAndCheck = True 'Default value (True)
    m_bColorEmbossed = True 'Default value (True)
End Sub
Private Sub Class_Terminate()
    ' delete the fonts
    Call DeleteObject(m_MenuFont&)
    Call DeleteObject(m_MenuFontSep&)
    Set mvarHelpCB = Nothing
End Sub
Public Property Let ComplexChecks(ByVal vData As Boolean)
    m_bComplexRadioAndCheck = vData
End Property
Public Property Get ComplexChecks() As Boolean
    ComplexChecks = m_bComplexRadioAndCheck
End Property
Public Property Let ColorEmbossed(ByVal vData As Boolean)
    m_bColorEmbossed = vData
End Property
Public Property Get ColorEmbossed() As Boolean
    ColorEmbossed = m_bColorEmbossed
End Property
Public Property Let RightToLeft(ByVal vData As Boolean)
    m_bRightToLeft = vData
End Property
Public Property Get RightToLeft() As Boolean
    RightToLeft = m_bRightToLeft
End Property
Public Property Let SelectColor(ByVal vData As Long)
    m_SelectColor& = vData&
End Property
Public Property Get SelectColor() As Long
    SelectColor& = m_SelectColor&
End Property
Public Property Let FullSelect(ByVal vData As Boolean)
    m_FullSelect = vData
End Property
Public Property Get FullSelect() As Boolean
    FullSelect = m_FullSelect
End Property
Public Property Let FontSize(ByVal vData As Long)
    m_FontSize = vData
    Call GetMenuFont(mvarhWnd, True)
End Property
Public Property Get FontSize() As Long
    FontSize = m_FontSize
End Property
Public Property Let ForeColor(ByVal vData As Long)
    m_ForeColor& = vData
End Property
Public Property Get ForeColor() As Long
    ForeColor = m_ForeColor&
End Property
Public Property Let FontName(ByVal vData As String)
    m_sFontName = vData
    Call GetMenuFont(mvarhWnd, True)
End Property
Public Property Get FontName() As String
    FontName = m_sFontName
End Property
Public Property Let MainPopedIndex(ByVal vData As String)
    iMainPopedIndex = vData
End Property
Public Property Get MainPopedIndex() As String
    MainPopedIndex = iMainPopedIndex
End Property
Public Property Let MenuFont(ByVal vData As Long)
    m_MenuFont = vData
End Property
Public Property Get MenuFont() As Long
    MenuFont = m_MenuFont
End Property
Public Property Let MenuFontSep(ByVal vData As Long)
    m_MenuFontSep = vData
End Property
Public Property Get MenuFontSep() As Long
    MenuFontSep = m_MenuFontSep
End Property
Public Property Let SCMainMenu(ByVal vData As Long)
    mvarSCMainMenu = vData
End Property
Public Property Get SCMainMenu() As Long
    SCMainMenu = mvarSCMainMenu
End Property

⌨️ 快捷键说明

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