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

  1. VERSION 5.00
  2. Object = "{E4D5D928-FD35-4D0A-92CD-F3CE02D68455}#1.0#0"; "ahtmlle2.ocx"
  3. Begin VB.UserControl HTMLBrowser 
  4.    BackColor       =   &H80000005&
  5.    BorderStyle     =   1  'Fixed Single
  6.    ClientHeight    =   4005
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   5730
  10.    ScaleHeight     =   4005
  11.    ScaleWidth      =   5730
  12.    Begin HTMLCtlsLE.HTMLLabel hlbBrowse 
  13.       Height          =   90
  14.       Left            =   315
  15.       TabIndex        =   1
  16.       Top             =   360
  17.       Width           =   4020
  18.       _ExtentX        =   7091
  19.       _ExtentY        =   159
  20.       AutoSize        =   -1  'True
  21.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  22.          Name            =   "MS Sans Serif"
  23.          Size            =   8.25
  24.          Charset         =   0
  25.          Weight          =   400
  26.          Underline       =   0   'False
  27.          Italic          =   0   'False
  28.          Strikethrough   =   0   'False
  29.       EndProperty
  30.       BackColor       =   -2147483643
  31.       ForeColor       =   -2147483640
  32.       Margin          =   3
  33.       Text            =   ""
  34.    End
  35.    Begin VB.VScrollBar vsbBrowse 
  36.       Height          =   3120
  37.       Left            =   5310
  38.       TabIndex        =   0
  39.       TabStop         =   0   'False
  40.       Top             =   90
  41.       Width           =   240
  42.    End
  43. End
  44. Attribute VB_Name = "HTMLBrowser"
  45. Attribute VB_GlobalNameSpace = False
  46. Attribute VB_Creatable = True
  47. Attribute VB_PredeclaredId = False
  48. Attribute VB_Exposed = False
  49.  
  50. '----------------------------------'
  51. '            Ariad HTMLBox Control '
  52. '                      Version 1.0 '
  53. '----------------------------------'
  54. '       HTMLBrowser Sample Control '
  55. '                      Version 1.0 '
  56. '----------------------------------'
  57. 'Copyright ⌐ 2001 by Ariad Software. All Rights Reserved.
  58.  
  59. 'Created        : 29/07/2001
  60. 'Completed      :
  61. 'Last Updated   :
  62.  
  63.  
  64. Option Explicit
  65. '----------------------------------------------------------------------
  66. 'Name        : Font
  67. 'Created     : 14/07/1999 19:12
  68. 'Modified    :
  69. 'Modified By :
  70. '----------------------------------------------------------------------
  71. 'Author      : Richard James Moss
  72. 'Organisation: Ariad Software
  73. '----------------------------------------------------------------------
  74. 'Description : Returns or sets the primary font object
  75. '----------------------------------------------------------------------
  76. 'Returns     : A font object containing the font
  77. '----------------------------------------------------------------------
  78. Public Property Get Font() As StdFont
  79.     '##BD Returns or sets the default font used to display text in a control
  80.     Set Font = hlbBrowse.Font
  81. End Property
  82.  
  83. Public Property Set Font(ByVal Font As StdFont)
  84.     Set hlbBrowse.Font = Font
  85.     PropertyChanged "Font"
  86. End Property
  87.  
  88. '##AUTHOR Richard James Moss
  89. '##CREATION_DATE 29/07/2001 00:58
  90. '##BLOCK_DESCRIPTION Loads a html document
  91. '##UPDATE_NOTE
  92. Public Sub Load(ByVal Filename As String)
  93. Attribute Load.VB_Description = "Loads a html document"
  94.     hlbBrowse.Load Filename
  95. End Sub '(Public) Sub Load ()
  96.  
  97.  
  98. Private Sub hlbBrowse_AfterRender()
  99.     vsbBrowse.Max = hlbBrowse.Height - ScaleHeight
  100.     vsbBrowse.LargeChange = ScaleHeight / 4
  101. End Sub
  102.  
  103. Private Sub UserControl_AmbientChanged(PropertyName As String)
  104.     If Ambient.UserMode = False Then
  105.         hlbBrowse.Text = Ambient.DisplayName
  106.     End If
  107. End Sub
  108.  
  109. Private Sub UserControl_InitProperties()
  110.     Set hlbBrowse.Font = Ambient.Font
  111.     hlbBrowse.Text = Ambient.DisplayName
  112. End Sub
  113.  
  114. Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
  115.     With PropBag
  116.         Set hlbBrowse.Font = .ReadProperty("Font", Ambient.Font)
  117.     End With
  118.     hlbBrowse.Text = Ambient.DisplayName
  119. End Sub
  120.  
  121.  
  122. Private Sub UserControl_Resize()
  123.     On Error Resume Next
  124.         vsbBrowse.Move ScaleWidth - vsbBrowse.Width, 0, vsbBrowse.Width, ScaleHeight
  125.         hlbBrowse.Move 0, 0, ScaleWidth - vsbBrowse.Width
  126.         vsbBrowse_Change
  127.     On Error GoTo 0
  128. End Sub
  129.  
  130.  
  131. Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
  132.     With PropBag
  133.         .WriteProperty "Font", hlbBrowse.Font, Ambient.Font
  134.     End With
  135. End Sub
  136.  
  137.  
  138. Private Sub vsbBrowse_Change()
  139.     hlbBrowse.Top = -vsbBrowse.Value
  140. End Sub
  141.  
  142.  
  143. Private Sub vsbBrowse_Scroll()
  144.     vsbBrowse_Change
  145. End Sub
  146.  
  147.  
  148.