VERSION 5.00
Begin VB.UserControl TopMenu 
   Alignable       =   -1  'True
   AutoRedraw      =   -1  'True
   ClientHeight    =   3600
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4800
   ControlContainer=   -1  'True
   DefaultCancel   =   -1  'True
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ScaleHeight     =   3600
   ScaleWidth      =   4800
   ToolboxBitmap   =   "TopMenu.ctx":0000
   Begin InterFX_Controls.RotativeLabel cmdGroupTop 
      Align           =   1  'Align Top
      Height          =   330
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4800
      _ExtentX        =   8467
      _ExtentY        =   582
      BackColor       =   0
      CurrentY        =   19
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   16777215
      DegradeeStyle   =   3
      DegradeeSteps   =   40
      CaptionY        =   0
      Angle           =   0
      DegradeeInit    =   16744576
      SimulateCaptionDrag=   0   'False
      Begin InterFX_Controls.TransparentPicture tpcExpand 
         Height          =   150
         Index           =   1
         Left            =   2430
         TabIndex        =   2
         Top             =   90
         Width           =   375
         _ExtentX        =   661
         _ExtentY        =   265
         Picture         =   "TopMenu.ctx":0312
      End
      Begin InterFX_Controls.TransparentPicture tpcExpand 
         Height          =   150
         Index           =   0
         Left            =   2430
         TabIndex        =   1
         Top             =   90
         Width           =   375
         _ExtentX        =   661
         _ExtentY        =   265
         Picture         =   "TopMenu.ctx":05A4
         MaskColor       =   16777215
      End
      Begin InterFX_Controls.TransparentPicture tpcCompress 
         Height          =   150
         Index           =   1
         Left            =   4365
         TabIndex        =   3
         Top             =   90
         Width           =   375
         _ExtentX        =   661
         _ExtentY        =   265
         Picture         =   "TopMenu.ctx":0836
      End
      Begin InterFX_Controls.TransparentPicture tpcCompress 
         Height          =   150
         Index           =   0
         Left            =   3645
         TabIndex        =   4
         Top             =   90
         Width           =   375
         _ExtentX        =   661
         _ExtentY        =   265
         Picture         =   "TopMenu.ctx":0AC8
         MaskColor       =   16777215
      End
   End
End
Attribute VB_Name = "TopMenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
'Default Property Values:
Const m_def_ToolTipText = "0"
Const m_def_Folded = 0
Const m_def_MaxHeight = 0
'Property Variables:
Dim m_SyncObject As Object
Dim m_ToolTipText As String
Dim m_Folded As Boolean
Dim m_MaxHeight As Integer
'Event Declarations:
Event Click() 'MappingInfo=UserControl,UserControl,-1,Click
Attribute Click.VB_Description = "Occurs when the user presses and then releases a mouse button over an object."
Event DblClick() 'MappingInfo=UserControl,UserControl,-1,DblClick
Attribute DblClick.VB_Description = "Occurs when the user presses and releases a mouse button and then presses and releases it again over an object."
Event Hide() 'MappingInfo=UserControl,UserControl,-1,Hide
Attribute Hide.VB_Description = "Occurs when the control's Visible property changes to False."
Event KeyDown(KeyCode As Integer, Shift As Integer) 'MappingInfo=UserControl,UserControl,-1,KeyDown
Attribute KeyDown.VB_Description = "Occurs when the user presses a key while an object has the focus."
Event KeyPress(KeyAscii As Integer) 'MappingInfo=UserControl,UserControl,-1,KeyPress
Attribute KeyPress.VB_Description = "Occurs when the user presses and releases an ANSI key."
Event KeyUp(KeyCode As Integer, Shift As Integer) 'MappingInfo=UserControl,UserControl,-1,KeyUp
Attribute KeyUp.VB_Description = "Occurs when the user releases a key while an object has the focus."
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=UserControl,UserControl,-1,MouseDown
Attribute MouseDown.VB_Description = "Occurs when the user presses the mouse button while an object has the focus."
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=UserControl,UserControl,-1,MouseMove
Attribute MouseMove.VB_Description = "Occurs when the user moves the mouse."
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=UserControl,UserControl,-1,MouseUp
Attribute MouseUp.VB_Description = "Occurs when the user releases the mouse button while an object has the focus."
Event Resize() 'MappingInfo=UserControl,UserControl,-1,Resize
Attribute Resize.VB_Description = "Occurs when a form is first displayed or the size of an object changes."
Event Show() 'MappingInfo=UserControl,UserControl,-1,Show
Attribute Show.VB_Description = "Occurs when the control's Visible property changes to True."
Event SizeChanged()


Private Sub ReCycle()

    With UserControl
    
    .tpcExpand(0).Visible = m_Folded
    .tpcExpand(1).Visible = m_Folded
    .tpcCompress(0).Visible = Not m_Folded
    .tpcCompress(1).Visible = Not m_Folded
    
        If m_Folded Then
        .Height = (.cmdGroupTop.Height + IIf(.BorderStyle = 1, 4, 0))
        
        Else
        .Height = m_MaxHeight
        
        End If
        
    End With

RaiseEvent SizeChanged

End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,Angle
Public Property Get Angle() As Long
Attribute Angle.VB_Description = "Returns/sets the inclination (in Degrees) of the caption."
    Angle = cmdGroupTop.Angle
End Property

Public Property Let Angle(ByVal New_Angle As Long)
    cmdGroupTop.Angle() = New_Angle
    PropertyChanged "Angle"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,AutoRedraw
Public Property Get AutoRedraw() As Boolean
Attribute AutoRedraw.VB_Description = "Returns/sets the output from a graphics method to a persistent bitmap."
    AutoRedraw = UserControl.AutoRedraw
End Property

Public Property Let AutoRedraw(ByVal New_AutoRedraw As Boolean)
    UserControl.AutoRedraw() = New_AutoRedraw
    PropertyChanged "AutoRedraw"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,BackColor
Public Property Get BackColor() As OLE_COLOR
Attribute BackColor.VB_Description = "Returns/sets the background color used to display text and graphics in an object."
    BackColor = cmdGroupTop.BackColor
End Property

Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
    cmdGroupTop.BackColor() = New_BackColor
    PropertyChanged "BackColor"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,BackStyle
Public Property Get BackStyle() As Integer
Attribute BackStyle.VB_Description = "Indicates whether a Label or the background of a Shape is transparent or opaque."
    BackStyle = UserControl.BackStyle
End Property

Public Property Let BackStyle(ByVal New_BackStyle As Integer)
    UserControl.BackStyle() = New_BackStyle
    PropertyChanged "BackStyle"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,BorderStyle
Public Property Get BorderStyle() As Integer
Attribute BorderStyle.VB_Description = "Returns/sets the border style for an object."
    BorderStyle = UserControl.BorderStyle
End Property

Public Property Let BorderStyle(ByVal New_BorderStyle As Integer)
    UserControl.BorderStyle() = New_BorderStyle
    PropertyChanged "BorderStyle"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,Caption
Public Property Get Caption() As String
Attribute Caption.VB_Description = "Returns/sets the text to be displayed on the control."
    Caption = cmdGroupTop.Caption
End Property

Public Property Let Caption(ByVal New_Caption As String)
    cmdGroupTop.Caption() = New_Caption
    PropertyChanged "Caption"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,CaptionX
Public Property Get CaptionX() As Long
Attribute CaptionX.VB_Description = "Returns/sets the X Axis position of the text."
    CaptionX = cmdGroupTop.CaptionX
End Property

Public Property Let CaptionX(ByVal New_CaptionX As Long)
    cmdGroupTop.CaptionX() = New_CaptionX
    PropertyChanged "CaptionX"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,CaptionY
Public Property Get CaptionY() As Long
Attribute CaptionY.VB_Description = "Returns/sets the Y Axis position of the text."
    CaptionY = cmdGroupTop.CaptionY
End Property

Public Property Let CaptionY(ByVal New_CaptionY As Long)
    cmdGroupTop.CaptionY() = New_CaptionY
    PropertyChanged "CaptionY"
End Property

Private Sub ReplaceControls()

Dim Var As Long

    With UserControl

    Var = (.ScaleWidth - 29 * 15)

    .tpcCompress(0).Left = Var
    .tpcCompress(1).Left = Var
    .tpcExpand(0).Left = Var
    .tpcExpand(1).Left = Var

    Var = ((.cmdGroupTop.Height - .tpcCompress(0).Height) / 2)

    .tpcCompress(0).Top = Var
    .tpcCompress(1).Top = Var
    .tpcExpand(0).Top = Var
    .tpcExpand(1).Top = Var
    
    End With

End Sub

Private Sub cmdGroupTop_Click(X As Single, Y As Single, PointColor As stdole.OLE_COLOR)
m_Folded = Not m_Folded
Call ReCycle
End Sub

Private Sub tpcCompress_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
tpcCompress(1).Visible = False
End Sub


Private Sub tpcCompress_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
tpcCompress(1).Visible = True

    If X <= 150 And X >= 0 And Y <= 375 And Y >= 0 Then
    m_Folded = Not m_Folded
    Call ReCycle
    End If
    
End Sub


Private Sub tpcExpand_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)

tpcExpand(1).Visible = False

End Sub


Private Sub tpcExpand_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
tpcExpand(1).Visible = True

    If X <= 150 And X >= 0 And Y <= 375 And Y >= 0 Then
    m_Folded = Not m_Folded
    Call ReCycle
    End If
    

End Sub


Private Sub UserControl_Click()
    RaiseEvent Click
    Debug.Print UserControl.ParentControls(0).Name
End Sub


'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Controls
Public Property Get Controls() As Object
Attribute Controls.VB_Description = "A collection whose elements represent each control on a form, including elements of control arrays. "
    Set Controls = UserControl.Controls
End Property

Private Sub UserControl_DblClick()
    RaiseEvent DblClick
End Sub

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,DegradeeColor
Public Property Get DegradeeColor() As OLE_COLOR
Attribute DegradeeColor.VB_Description = "Returns/sets the Final color of the Degradée effect."
    DegradeeColor = cmdGroupTop.DegradeeColor
End Property

Public Property Let DegradeeColor(ByVal New_DegradeeColor As OLE_COLOR)
    cmdGroupTop.DegradeeColor() = New_DegradeeColor
    PropertyChanged "DegradeeColor"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,DegradeeInit
Public Property Get DegradeeInit() As OLE_COLOR
Attribute DegradeeInit.VB_Description = "Returns/sets the initial color of the Degradée effect."
    DegradeeInit = cmdGroupTop.DegradeeInit
End Property

Public Property Let DegradeeInit(ByVal New_DegradeeInit As OLE_COLOR)
    cmdGroupTop.DegradeeInit() = New_DegradeeInit
    PropertyChanged "DegradeeInit"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,DegradeeSteps
Public Property Get DegradeeSteps() As Byte
Attribute DegradeeSteps.VB_Description = "Returns/sets the number of steps used by the Degradée effect."
    DegradeeSteps = cmdGroupTop.DegradeeSteps
End Property

Public Property Let DegradeeSteps(ByVal New_DegradeeSteps As Byte)
    cmdGroupTop.DegradeeSteps() = New_DegradeeSteps
    PropertyChanged "DegradeeSteps"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,DegradeeStyle
Public Property Get DegradeeStyle() As rblStyles
Attribute DegradeeStyle.VB_Description = "Returns/sets the style of the Degradée effect. 0 disables the Degradée."
    DegradeeStyle = cmdGroupTop.DegradeeStyle
End Property

Public Property Let DegradeeStyle(ByVal New_DegradeeStyle As rblStyles)
    cmdGroupTop.DegradeeStyle() = New_DegradeeStyle
    PropertyChanged "DegradeeStyle"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Enabled
Public Property Get Enabled() As Boolean
Attribute Enabled.VB_Description = "Returns/sets a value that determines whether an object can respond to user-generated events."
    Enabled = UserControl.Enabled
End Property

Public Property Let Enabled(ByVal New_Enabled As Boolean)
    UserControl.Enabled() = New_Enabled
    PropertyChanged "Enabled"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,Font
Public Property Get Font() As Font
Attribute Font.VB_Description = "Returns a Font object."
Attribute Font.VB_UserMemId = -512
    Set Font = cmdGroupTop.Font
End Property

Public Property Set Font(ByVal New_Font As Font)
    Set cmdGroupTop.Font = New_Font
    PropertyChanged "Font"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,FontWidth
Public Property Get FontWidth() As Long
    FontWidth = cmdGroupTop.FontWidth
End Property

Public Property Let FontWidth(ByVal New_FontWidth As Long)
    cmdGroupTop.FontWidth() = New_FontWidth
    PropertyChanged "FontWidth"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,ForeColor
Public Property Get ForeColor() As OLE_COLOR
Attribute ForeColor.VB_Description = "Returns/sets the foreground color used to display text and graphics in an object."
    ForeColor = cmdGroupTop.ForeColor
End Property

Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR)
    cmdGroupTop.ForeColor() = New_ForeColor
    PropertyChanged "ForeColor"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,hDC
Public Property Get hDC() As Long
Attribute hDC.VB_Description = "Returns a handle (from Microsoft Windows) to the object's device context."
    hDC = UserControl.hDC
End Property

Private Sub UserControl_Hide()
    RaiseEvent Hide
End Sub

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,hWnd
Public Property Get hWnd() As Long
Attribute hWnd.VB_Description = "Returns a handle (from Microsoft Windows) to an object's window."
    hWnd = UserControl.hWnd
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,InverseShadow
Public Property Get InverseShadow() As Boolean
Attribute InverseShadow.VB_Description = "Returns/sets a boolean that indicates the use of a 'drop shadow' relative to the normal shadow."
    InverseShadow = cmdGroupTop.InverseShadow
End Property

Public Property Let InverseShadow(ByVal New_InverseShadow As Boolean)
    cmdGroupTop.InverseShadow() = New_InverseShadow
    PropertyChanged "InverseShadow"
End Property

Private Sub UserControl_KeyDown(KeyCode As Integer, Shift As Integer)
    RaiseEvent KeyDown(KeyCode, Shift)
End Sub

Private Sub UserControl_KeyPress(KeyAscii As Integer)
    RaiseEvent KeyPress(KeyAscii)
End Sub

Private Sub UserControl_KeyUp(KeyCode As Integer, Shift As Integer)
    RaiseEvent KeyUp(KeyCode, Shift)
End Sub

Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    RaiseEvent MouseDown(Button, Shift, X, Y)
End Sub

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,MouseIcon
Public Property Get MouseIcon() As Picture
Attribute MouseIcon.VB_Description = "Sets a custom mouse icon."
    Set MouseIcon = UserControl.MouseIcon
End Property

Public Property Set MouseIcon(ByVal New_MouseIcon As Picture)
    Set UserControl.MouseIcon = New_MouseIcon
    PropertyChanged "MouseIcon"
End Property

Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    RaiseEvent MouseMove(Button, Shift, X, Y)
End Sub

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,MousePointer
Public Property Get MousePointer() As Integer
Attribute MousePointer.VB_Description = "Returns/sets the type of mouse pointer displayed when over part of an object."
    MousePointer = UserControl.MousePointer
End Property

Public Property Let MousePointer(ByVal New_MousePointer As Integer)
    UserControl.MousePointer() = New_MousePointer
    PropertyChanged "MousePointer"
End Property

Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    RaiseEvent MouseUp(Button, Shift, X, Y)
End Sub

Private Sub UserControl_Resize()
On Error GoTo UserControl_Resize_Err

Dim Counter As Integer, Obj As Object

    If Not m_Folded Then
    m_MaxHeight = UserControl.Height
    
    Else
    UserControl.Height = (UserControl.cmdGroupTop.Height + (IIf(UserControl.BorderStyle = 1, 4, 0)))
    
    End If
    
    For Counter = 0 To UserControl.Parent.Controls.Count - 1
    
        If UserControl.Parent.Controls(Counter).Name = UserControl.Ambient.DisplayName Then
        Set Obj = UserControl.Parent.Controls(Counter)
        Counter = UserControl.Parent.Controls.Count - 1
        End If
        
    Next Counter
    
    m_SyncObject.Width = Obj.Width
    m_SyncObject.Top = Obj.Top + Obj.Height
    m_SyncObject.Left = Obj.Left
    m_SyncObject.ReDesign

Call ReplaceControls
RaiseEvent Resize
PropertyChanged MaxHeight
    
Exit Sub
UserControl_Resize_Err:

    If Err.Number = 91 Then Resume Next
    
End Sub

'The Underscore following "Scale" is necessary because it
'is a Reserved Word in VBA.
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Scale
Public Sub Scale_(Optional X1 As Variant, Optional Y1 As Variant, Optional X2 As Variant, Optional Y2 As Variant)
    UserControl.Scale (X1, Y1)-(X2, Y2)
End Sub

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,ScaleHeight
Public Property Get ScaleHeight() As Single
Attribute ScaleHeight.VB_Description = "Returns/sets the number of units for the vertical measurement of an object's interior."
    ScaleHeight = UserControl.ScaleHeight
End Property

Public Property Let ScaleHeight(ByVal New_ScaleHeight As Single)
    UserControl.ScaleHeight() = New_ScaleHeight
    PropertyChanged "ScaleHeight"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,ScaleLeft
Public Property Get ScaleLeft() As Single
Attribute ScaleLeft.VB_Description = "Returns/sets the horizontal coordinates for the left edges of an object."
    ScaleLeft = UserControl.ScaleLeft
End Property

Public Property Let ScaleLeft(ByVal New_ScaleLeft As Single)
    UserControl.ScaleLeft() = New_ScaleLeft
    PropertyChanged "ScaleLeft"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,ScaleMode
Public Property Get ScaleMode() As Integer
Attribute ScaleMode.VB_Description = "Returns/sets a value indicating measurement units for object coordinates when using graphics methods or positioning controls."
    ScaleMode = UserControl.ScaleMode
End Property

Public Property Let ScaleMode(ByVal New_ScaleMode As Integer)
    UserControl.ScaleMode() = New_ScaleMode
    PropertyChanged "ScaleMode"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,ScaleTop
Public Property Get ScaleTop() As Single
Attribute ScaleTop.VB_Description = "Returns/sets the vertical coordinates for the top edges of an object."
    ScaleTop = UserControl.ScaleTop
End Property

Public Property Let ScaleTop(ByVal New_ScaleTop As Single)
    UserControl.ScaleTop() = New_ScaleTop
    PropertyChanged "ScaleTop"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,ScaleWidth
Public Property Get ScaleWidth() As Single
Attribute ScaleWidth.VB_Description = "Returns/sets the number of units for the horizontal measurement of an object's interior."
    ScaleWidth = UserControl.ScaleWidth
End Property

Public Property Let ScaleWidth(ByVal New_ScaleWidth As Single)
    UserControl.ScaleWidth() = New_ScaleWidth
    PropertyChanged "ScaleWidth"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,ShadowDisplacementX
Public Property Get ShadowDisplacementX() As Integer
Attribute ShadowDisplacementX.VB_Description = "Returns/sets the shadow displacement X coordinate."
    ShadowDisplacementX = cmdGroupTop.ShadowDisplacementX
End Property

Public Property Let ShadowDisplacementX(ByVal New_ShadowDisplacementX As Integer)
    cmdGroupTop.ShadowDisplacementX() = New_ShadowDisplacementX
    PropertyChanged "ShadowDisplacementX"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,ShadowDisplacementY
Public Property Get ShadowDisplacementY() As Integer
Attribute ShadowDisplacementY.VB_Description = "Returns/sets the shadow displacement Y coordinate."
    ShadowDisplacementY = cmdGroupTop.ShadowDisplacementY
End Property

Public Property Let ShadowDisplacementY(ByVal New_ShadowDisplacementY As Integer)
    cmdGroupTop.ShadowDisplacementY() = New_ShadowDisplacementY
    PropertyChanged "ShadowDisplacementY"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,Shadowed
Public Property Get Shadowed() As Boolean
Attribute Shadowed.VB_Description = "Returns/sets a boolean tha indicates the use of a Shadow text."
    Shadowed = cmdGroupTop.Shadowed
End Property

Public Property Let Shadowed(ByVal New_Shadowed As Boolean)
    cmdGroupTop.Shadowed() = New_Shadowed
    PropertyChanged "Shadowed"
End Property

Private Sub UserControl_Show()
    RaiseEvent Show
End Sub
'
''WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
''MappingInfo=cmdGroupTop,cmdGroupTop,-1,ToolTipText
'Public Property Get ToolTipText() As String
'    ToolTipText = cmdGroupTop.ToolTipText
'End Property
'
'Public Property Let ToolTipText(ByVal New_ToolTipText As String)
'    cmdGroupTop.ToolTipText() = New_ToolTipText
'    PropertyChanged "ToolTipText"
'End Property

Public Property Get Folded() As Boolean
    Folded = m_Folded
End Property

Public Property Let Folded(ByVal New_Folded As Boolean)
m_Folded = New_Folded
Call ReCycle
Call ReplaceControls
PropertyChanged "Folded"
End Property

Public Property Get MaxHeight() As Integer
    MaxHeight = m_MaxHeight
End Property

Public Property Let MaxHeight(ByVal New_MaxHeight As Integer)
    m_MaxHeight = New_MaxHeight
    PropertyChanged "MaxHeight"
End Property

'Initialize Properties for User Control
Private Sub UserControl_InitProperties()
    m_Folded = m_def_Folded
    m_MaxHeight = m_def_MaxHeight
    m_ToolTipText = m_def_ToolTipText
    
    Call ReCycle
    Call ReplaceControls
    
End Sub

'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

    cmdGroupTop.Align = PropBag.ReadProperty("Align", 1)
    cmdGroupTop.Angle = PropBag.ReadProperty("Angle", 90)
    UserControl.AutoRedraw = PropBag.ReadProperty("AutoRedraw", True)
    cmdGroupTop.BackColor = PropBag.ReadProperty("BackColor", &H808080)
    UserControl.BackStyle = PropBag.ReadProperty("BackStyle", 1)
    UserControl.BorderStyle = PropBag.ReadProperty("BorderStyle", 0)
    cmdGroupTop.Caption = PropBag.ReadProperty("Caption", "RotativeText")
    cmdGroupTop.CaptionX = PropBag.ReadProperty("CaptionX", 6)
    cmdGroupTop.CaptionY = PropBag.ReadProperty("CaptionY", 6)
    cmdGroupTop.DegradeeColor = PropBag.ReadProperty("DegradeeColor", 12632256)
    cmdGroupTop.DegradeeInit = PropBag.ReadProperty("DegradeeInit", 255)
    cmdGroupTop.DegradeeSteps = PropBag.ReadProperty("DegradeeSteps", 30)
    cmdGroupTop.DegradeeStyle = PropBag.ReadProperty("DegradeeStyle", 1)
    UserControl.Enabled = PropBag.ReadProperty("Enabled", True)
    Set Font = PropBag.ReadProperty("Font", Ambient.Font)
    cmdGroupTop.FontWidth = PropBag.ReadProperty("FontWidth", 0)
    cmdGroupTop.ForeColor = PropBag.ReadProperty("ForeColor", &H80000012)
    cmdGroupTop.InverseShadow = PropBag.ReadProperty("InverseShadow", False)
    Set MouseIcon = PropBag.ReadProperty("MouseIcon", Nothing)
    UserControl.MousePointer = PropBag.ReadProperty("MousePointer", 0)
    UserControl.ScaleHeight = PropBag.ReadProperty("ScaleHeight", 240)
    UserControl.ScaleLeft = PropBag.ReadProperty("ScaleLeft", 0)
    UserControl.ScaleMode = PropBag.ReadProperty("ScaleMode", 1)
    UserControl.ScaleTop = PropBag.ReadProperty("ScaleTop", 0)
    UserControl.ScaleWidth = PropBag.ReadProperty("ScaleWidth", 320)
    cmdGroupTop.ShadowDisplacementX = PropBag.ReadProperty("ShadowDisplacementX", 1)
    cmdGroupTop.ShadowDisplacementY = PropBag.ReadProperty("ShadowDisplacementY", 1)
    cmdGroupTop.Shadowed = PropBag.ReadProperty("Shadowed", True)
    cmdGroupTop.ToolTipText = PropBag.ReadProperty("ToolTipText", "")
    m_Folded = PropBag.ReadProperty("Folded", m_def_Folded)
    m_MaxHeight = PropBag.ReadProperty("MaxHeight", m_def_MaxHeight)
    m_ToolTipText = PropBag.ReadProperty("ToolTipText", m_def_ToolTipText)
    cmdGroupTop.Height = PropBag.ReadProperty("HeaderHeight", 0)
    
    Call ReCycle
    Call ReplaceControls
    
    Set m_SyncObject = PropBag.ReadProperty("SyncObject", Nothing)
End Sub

'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

    Call PropBag.WriteProperty("Align", cmdGroupTop.Align, 1)
    Call PropBag.WriteProperty("Angle", cmdGroupTop.Angle, 90)
    Call PropBag.WriteProperty("AutoRedraw", UserControl.AutoRedraw, True)
    Call PropBag.WriteProperty("BackColor", cmdGroupTop.BackColor, &H808080)
    Call PropBag.WriteProperty("BackStyle", UserControl.BackStyle, 1)
    Call PropBag.WriteProperty("BorderStyle", UserControl.BorderStyle, 0)
    Call PropBag.WriteProperty("Caption", cmdGroupTop.Caption, "RotativeText")
    Call PropBag.WriteProperty("CaptionX", cmdGroupTop.CaptionX, 6)
    Call PropBag.WriteProperty("CaptionY", cmdGroupTop.CaptionY, 6)
    Call PropBag.WriteProperty("DegradeeColor", cmdGroupTop.DegradeeColor, 12632256)
    Call PropBag.WriteProperty("DegradeeInit", cmdGroupTop.DegradeeInit, 255)
    Call PropBag.WriteProperty("DegradeeSteps", cmdGroupTop.DegradeeSteps, 30)
    Call PropBag.WriteProperty("DegradeeStyle", cmdGroupTop.DegradeeStyle, 1)
    Call PropBag.WriteProperty("Enabled", UserControl.Enabled, True)
    Call PropBag.WriteProperty("Font", Font, Ambient.Font)
    Call PropBag.WriteProperty("FontWidth", cmdGroupTop.FontWidth, 0)
    Call PropBag.WriteProperty("ForeColor", cmdGroupTop.ForeColor, &H80000012)
    Call PropBag.WriteProperty("InverseShadow", cmdGroupTop.InverseShadow, False)
    Call PropBag.WriteProperty("MouseIcon", MouseIcon, Nothing)
    Call PropBag.WriteProperty("MousePointer", UserControl.MousePointer, 0)
    Call PropBag.WriteProperty("ScaleHeight", UserControl.ScaleHeight, 240)
    Call PropBag.WriteProperty("ScaleLeft", UserControl.ScaleLeft, 0)
    Call PropBag.WriteProperty("ScaleMode", UserControl.ScaleMode, 1)
    Call PropBag.WriteProperty("ScaleTop", UserControl.ScaleTop, 0)
    Call PropBag.WriteProperty("ScaleWidth", UserControl.ScaleWidth, 320)
    Call PropBag.WriteProperty("ShadowDisplacementX", cmdGroupTop.ShadowDisplacementX, 1)
    Call PropBag.WriteProperty("ShadowDisplacementY", cmdGroupTop.ShadowDisplacementY, 1)
    Call PropBag.WriteProperty("Shadowed", cmdGroupTop.Shadowed, True)
    Call PropBag.WriteProperty("ToolTipText", cmdGroupTop.ToolTipText, "")
    Call PropBag.WriteProperty("Folded", m_Folded, m_def_Folded)
    Call PropBag.WriteProperty("MaxHeight", m_MaxHeight, m_def_MaxHeight)
    Call PropBag.WriteProperty("ToolTipText", m_ToolTipText, m_def_ToolTipText)
    Call PropBag.WriteProperty("HeaderHeight", cmdGroupTop.Height, 0)
    Call PropBag.WriteProperty("SyncObject", m_SyncObject, Nothing)
End Sub

Public Property Get ToolTipText() As String
Attribute ToolTipText.VB_Description = "Returns/sets the text displayed when the mouse is paused over the control."
    ToolTipText = m_ToolTipText
End Property

Public Property Let ToolTipText(ByVal New_ToolTipText As String)
    m_ToolTipText = New_ToolTipText
    PropertyChanged "ToolTipText"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=cmdGroupTop,cmdGroupTop,-1,CurrentX
Public Property Get HeaderHeight() As Single
Attribute HeaderHeight.VB_Description = "Returns/sets the horizontal coordinates for next print or draw method."
    HeaderHeight = cmdGroupTop.Height
End Property

Public Property Let HeaderHeight(ByVal New_HeaderHeight As Single)
    cmdGroupTop.Height = New_HeaderHeight
    PropertyChanged "HeaderHeight"
End Property

Public Property Get SyncObject() As Object
Set SyncObject = m_SyncObject
End Property

Public Property Set SyncObject(ByVal New_SyncObject As Object)
    Set m_SyncObject = New_SyncObject
    Call UserControl_Resize
    PropertyChanged "SyncObject"
End Property

Public Function ReDesign() As Variant

UserControl_Resize

End Function

