home *** CD-ROM | disk | FTP | other *** search
/ distrib.akp.su/Programming/Vb-6+Rus/ / distrib.akp.su.tar / distrib.akp.su / Programming / Vb-6+Rus / VB98 / TEMPLATE / USERCTLS / COLORFUL.CTL next >
Text File  |  1998-06-18  |  1KB  |  57 lines

  1. VERSION 5.00
  2. Begin VB.UserControl Colorful 
  3.    BackColor       =   &H000080FF&
  4.    ClientHeight    =   3600
  5.    ClientLeft      =   0
  6.    ClientTop       =   0
  7.    ClientWidth     =   4800
  8.    EditAtDesignTime=   -1  'True
  9.    PaletteMode     =   0  'Halftone
  10.    ScaleHeight     =   240
  11.    ScaleMode       =   3  'Pixel
  12.    ScaleWidth      =   320
  13.    Begin VB.Shape Shape1 
  14.       BorderWidth     =   5
  15.       FillColor       =   &H0000FFFF&
  16.       FillStyle       =   0  'Solid
  17.       Height          =   1575
  18.       Left            =   0
  19.       Shape           =   2  'Oval
  20.       Top             =   0
  21.       Width           =   1575
  22.    End
  23. End
  24. Attribute VB_Name = "Colorful"
  25. Attribute VB_GlobalNameSpace = False
  26. Attribute VB_Creatable = True
  27. Attribute VB_PredeclaredId = False
  28. Attribute VB_Exposed = True
  29. Public Property Get Color() As OLE_COLOR
  30.   Color = Shape1.FillColor
  31. End Property
  32.  
  33. Public Property Let Color(ByVal c As OLE_COLOR)
  34.   Shape1.FillColor = c
  35. End Property
  36.  
  37. Private Sub UserControl_Click()
  38.   Shape1.FillColor = &HFF0000
  39. End Sub
  40.  
  41.  
  42. Private Sub UserControl_EnterFocus()
  43.   Shape1.BorderColor = &HFFFFFF
  44. End Sub
  45.  
  46. Private Sub UserControl_ExitFocus()
  47.   Shape1.BorderColor = &H0
  48. End Sub
  49.  
  50. Private Sub UserControl_Resize()
  51.   d = Shape1.BorderWidth / 2
  52.   Shape1.Left = d
  53.   Shape1.Top = d
  54.   Shape1.Width = ScaleWidth - d * 2
  55.   Shape1.Height = ScaleHeight - d * 2
  56. End Sub
  57.