home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Dynamic Bu22180742001.psc / Controls / LargeIcon.ctl < prev   
Encoding:
Text File  |  2001-07-03  |  2.9 KB  |  104 lines

  1. VERSION 5.00
  2. Begin VB.UserControl LargeIcon 
  3.    BackColor       =   &H80000010&
  4.    ClientHeight    =   1185
  5.    ClientLeft      =   0
  6.    ClientTop       =   0
  7.    ClientWidth     =   1530
  8.    ControlContainer=   -1  'True
  9.    ScaleHeight     =   1185
  10.    ScaleWidth      =   1530
  11.    Begin prjButtonBar.LargeButton3D LargeButton3D1 
  12.       Height          =   615
  13.       Left            =   480
  14.       Top             =   120
  15.       Width           =   615
  16.       _ExtentX        =   1085
  17.       _ExtentY        =   1085
  18.    End
  19.    Begin VB.Label lblCaption 
  20.       Alignment       =   2  'Center
  21.       BackColor       =   &H80000010&
  22.       Caption         =   "Testcaption"
  23.       ForeColor       =   &H8000000E&
  24.       Height          =   255
  25.       Left            =   0
  26.       TabIndex        =   0
  27.       Top             =   840
  28.       Width           =   1455
  29.    End
  30. End
  31. Attribute VB_Name = "LargeIcon"
  32. Attribute VB_GlobalNameSpace = False
  33. Attribute VB_Creatable = True
  34. Attribute VB_PredeclaredId = False
  35. Attribute VB_Exposed = False
  36. Option Explicit
  37.  
  38. 'Local variables for the properties
  39. Private booHide                     As Boolean
  40.  
  41. 'Events
  42. Event Click()
  43.  
  44. '***************************************************************************
  45. 'Properties
  46. '***************************************************************************
  47. Public Property Get Caption() As String
  48.     Caption = lblCaption.Caption
  49. End Property
  50.  
  51. Public Property Let Caption(ByVal strValue As String)
  52.     lblCaption.Caption = strValue
  53.     PropertyChanged "Caption"
  54. End Property
  55.  
  56. Public Property Get ParentHwnd() As Long
  57.     'Retrieves the Hwnd from the parent
  58.     ParentHwnd = UserControl.Parent.ParentHwnd
  59. End Property
  60.  
  61. Public Property Let IconsStayUp(booValue As Boolean)
  62.     LargeButton3D1.StayUp = booValue
  63. End Property
  64.  
  65. Public Property Get IconsStayUp() As Boolean
  66.     IconsStayUp = LargeButton3D1.StayUp
  67. End Property
  68.  
  69. Public Property Get Hide() As Boolean
  70.     Hide = booHide
  71. End Property
  72.  
  73. Public Property Let Hide(booValue As Boolean)
  74.     booHide = strValue
  75.     PropertyChanged "Hide"
  76. End Property
  77.  
  78. Public Property Get Icon() As Picture
  79.     Set Icon = LargeButton3D1.Picture
  80. End Property
  81.  
  82. Public Property Set Icon(icoValue As Picture)
  83.     Set LargeButton3D1.Picture = icoValue
  84. End Property
  85.  
  86. '***************************************************************************
  87. 'Procedures
  88. '***************************************************************************
  89. '***************************************************************************
  90. 'Control events
  91. '***************************************************************************
  92. Private Sub LargeButton3D1_Click()
  93.     RaiseEvent Click
  94. End Sub
  95.  
  96. Private Sub UserControl_Resize()
  97.     UserControl.Height = 1215
  98.     
  99.     lblCaption.Left = 0
  100.     lblCaption.Width = UserControl.Width
  101.     LargeButton3D1.Left = (UserControl.Width - LargeButton3D1.Width) / 2
  102. End Sub
  103.  
  104.