VERSION 5.00
Begin VB.UserControl IconoCtrl 
   AutoRedraw      =   -1  'True
   ClientHeight    =   3240
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   3390
   ScaleHeight     =   3240
   ScaleWidth      =   3390
End
Attribute VB_Name = "IconoCtrl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Public Property Get Picture() As Picture
    Set Picture = UserControl.Picture
End Property
Public Property Set Picture(ByVal New_Picture As Picture)
    UserControl.Picture = New_Picture
    PropertyChanged "Picture"
    Transparencia
End Property

Public Property Get MaskColor() As OLE_COLOR
    MaskColor = UserControl.MaskColor
End Property
Public Property Let MaskColor(ByVal New_MaskColor As OLE_COLOR)
    UserControl.MaskColor = New_MaskColor
    PropertyChanged "MaskColor"
    Transparencia
End Property

Private Sub UserControl_InitProperties()
Me.MaskColor = vbMagenta
UserControl.BackColor = vbMagenta
End Sub

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    UserControl.Picture = PropBag.ReadProperty("Picture", Nothing)
    UserControl.MaskColor = PropBag.ReadProperty("MaskColor", vbMagenta)
    Transparencia
End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    Call PropBag.WriteProperty("Picture", UserControl.Picture, Nothing)
    Call PropBag.WriteProperty("MaskColor", UserControl.MaskColor, vbMagenta)
End Sub
Private Sub Transparencia()
    If Not UserControl.Picture Is Nothing Then
        UserControl.Width = ScaleX(UserControl.Picture.Width, vbHimetric, vbTwips)
        UserControl.Height = ScaleY(UserControl.Picture.Height, vbHimetric, vbTwips)
        UserControl.MaskPicture = UserControl.Image
    End If
End Sub

Private Sub UserControl_Show()
UserControl.BackStyle = vbTransparent
If Ambient.UserMode Then
    UserControl.Enabled = False
Else
    UserControl.Enabled = True
End If
End Sub
