home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / vbasic / Data / Utils / ahtmlle2.exe / MAINDIR / LogoPane.ctl < prev    next >
Encoding:
Text File  |  2001-08-07  |  5.9 KB  |  198 lines

  1. VERSION 5.00
  2. Begin VB.UserControl pucLogoPane 
  3.    Alignable       =   -1  'True
  4.    CanGetFocus     =   0   'False
  5.    ClientHeight    =   5280
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   1515
  9.    HasDC           =   0   'False
  10.    ScaleHeight     =   352
  11.    ScaleMode       =   3  'Pixel
  12.    ScaleWidth      =   101
  13.    ToolboxBitmap   =   "LogoPane.ctx":0000
  14.    Windowless      =   -1  'True
  15.    Begin VB.Line lneShad 
  16.       BorderColor     =   &H80000010&
  17.       Visible         =   0   'False
  18.       X1              =   -15
  19.       X2              =   228
  20.       Y1              =   270
  21.       Y2              =   270
  22.    End
  23.    Begin VB.Line lneHigh 
  24.       BorderColor     =   &H80000014&
  25.       Visible         =   0   'False
  26.       X1              =   -9
  27.       X2              =   237
  28.       Y1              =   282
  29.       Y2              =   282
  30.    End
  31.    Begin VB.Image imgLogo 
  32.       Height          =   510
  33.       Left            =   540
  34.       Top             =   495
  35.       Width           =   555
  36.    End
  37.    Begin VB.Image imgBackground 
  38.       Height          =   1500
  39.       Left            =   0
  40.       Picture         =   "LogoPane.ctx":00FA
  41.       Top             =   1260
  42.       Width           =   1500
  43.    End
  44. End
  45. Attribute VB_Name = "pucLogoPane"
  46. Attribute VB_GlobalNameSpace = False
  47. Attribute VB_Creatable = True
  48. Attribute VB_PredeclaredId = False
  49. Attribute VB_Exposed = False
  50.  
  51. '--------------------------------------'
  52. '            Ariad Development Library '
  53. '                          Version 3.0 '
  54. '--------------------------------------'
  55. '                 LogoPane UserControl '
  56. '                          Version 1.0 '
  57. '--------------------------------------'
  58. 'Copyright ⌐ 2000 by Ariad Software. All Rights Reserved.
  59.  
  60. 'Created        : 10/04/2000
  61. 'Completed      : 10/04/2000
  62. 'Last Updated   : 19/08/2000
  63.  
  64. '28/05/2000
  65. '           - Change Resize code to ensure that images
  66. '             are left aligned when Extender.Align
  67. '             is Top or Bottom
  68. '11/08/2000 - New shader lines for defining edge
  69. '19/08/2000 - Corrections to shader lines system
  70.  
  71. Option Explicit
  72. DefInt A-Z
  73.  
  74. Private pPicture As StdPicture
  75. '----------------------------------------------------------------------
  76. 'Name        : Picture
  77. 'Created     : 10/04/2000 14:13
  78. '----------------------------------------------------------------------
  79. 'Author      : Richard Moss
  80. 'Organisation: Ariad Software
  81. '----------------------------------------------------------------------
  82. 'Description : Returns or sets a graphic to be displayed in a control.
  83. '----------------------------------------------------------------------
  84. 'Returns     : Returns a StdPicture Object
  85. '----------------------------------------------------------------------
  86. 'Updates     :
  87. '
  88. '----------------------------------------------------------------------
  89. '                              Ariad Procedure Builder Add-In 1.00.0036
  90. Public Property Get Picture() As StdPicture
  91. Attribute Picture.VB_Description = "Returns or sets a graphic to be displayed in a control."
  92.  '##BLOCK_DESCRIPTION Returns or sets a graphic to be displayed in a control.
  93.  Set Picture = pPicture
  94. End Property '(Public) Property Get Picture () As StdPicture
  95.  
  96. Property Set Picture(ByVal Picture As StdPicture)
  97.  Set pPicture = Picture
  98.  Set imgLogo.Picture = Picture
  99.  PropertyChanged "Picture"
  100.  UserControl_Resize
  101. End Property ' Property Set Picture
  102.  
  103. Private Sub UserControl_AmbientChanged(PropertyName As String)
  104.  UserControl_Resize
  105. End Sub
  106.  
  107. Private Sub UserControl_Initialize()
  108.  AutoRedraw = -1
  109. End Sub
  110.  
  111.  
  112. Private Sub UserControl_InitProperties()
  113.     On Error Resume Next
  114.         Extender.Align = 3
  115.     On Error GoTo 0
  116.     UserControl_Resize
  117. End Sub
  118.  
  119.  
  120. Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
  121.  Set Picture = PropBag.ReadProperty("Picture", Nothing)
  122.  UserControl_Resize
  123. End Sub
  124.  
  125.  
  126. Private Sub UserControl_Resize()
  127.  Dim X, Y
  128.  On Error Resume Next
  129.   Cls
  130.   For X = 0 To ScaleWidth Step imgBackground.Width
  131.    For Y = 0 To ScaleHeight Step imgBackground.Height
  132.     PaintPicture imgBackground.Picture, X, Y
  133.    Next
  134.   Next
  135.   With imgLogo
  136.    If Extender.Align = vbAlignTop Or Extender.Align = vbAlignBottom Then
  137.     .Move Int((ScaleHeight - .Height) / 2), Int((ScaleHeight - .Height) / 2)
  138.    Else
  139.     .Move Int((ScaleWidth - .Width) / 2), Int((ScaleHeight - .Height) / 2)
  140.    End If
  141.   End With
  142.   lneShad.Visible = (Extender.Align <> vbAlignNone)
  143.   lneHigh.Visible = lneShad.Visible
  144.   Select Case Extender.Align
  145.    Case vbAlignBottom
  146.     MoveLine lneShad, -1, 0, ScaleWidth + 2, 0
  147.     MoveLine lneHigh, -1, 1, ScaleWidth + 2, 0
  148.    Case vbAlignTop
  149.     MoveLine lneShad, -1, ScaleHeight - 2, ScaleWidth + 2, 0
  150.     MoveLine lneHigh, -1, ScaleHeight - 1, ScaleWidth + 2, 0
  151.    Case vbAlignRight
  152.     MoveLine lneShad, 0, -1, 0, ScaleHeight + 2
  153.     MoveLine lneHigh, 1, -1, 0, ScaleHeight + 2
  154.    Case vbAlignLeft
  155.     MoveLine lneShad, ScaleWidth - 2, -1, 0, ScaleHeight + 2
  156.     MoveLine lneHigh, ScaleWidth - 1, -1, 0, ScaleHeight + 2
  157.   End Select
  158.  On Error GoTo 0
  159. End Sub
  160.  
  161.  
  162. '-----------------------------------
  163. 'Name        : MoveLine
  164. 'Created     : 18/04/2000 19:05
  165. '-----------------------------------
  166. 'Author      : Richard James Moss
  167. 'Organisation: Ariad Software
  168. '-----------------------------------
  169. 'Description : Moves a line control
  170. '-----------------------------------
  171. 'Updates     :
  172. '
  173. '-----------------------------------
  174. '             AS-PROCBUILD 1.00.0036
  175. Private Sub MoveLine(LineCtl As Line, Left, Top, Width, Height)
  176.  '##BLOCK_DESCRIPTION Moves a line control
  177.  With LineCtl
  178. '  .Visible = 0
  179.    .X1 = Left
  180.    .Y1 = Top
  181.    .X2 = Left + Width
  182.    .Y2 = Top + Height
  183. '  .Visible = -1
  184. '  .Refresh
  185.  End With
  186. End Sub '(Public) Sub MoveLine ()
  187.  
  188.  
  189. Private Sub UserControl_Show()
  190.  UserControl_Resize
  191. End Sub
  192.  
  193. Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
  194.  PropBag.WriteProperty "Picture", pPicture, Nothing
  195. End Sub
  196.  
  197.  
  198.