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