home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / arrays / vbstrapi / hintdial.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-06-24  |  4.4 KB  |  138 lines

  1. VERSION 2.00
  2. Begin Form HintDialog 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Hint"
  6.    ClientHeight    =   3930
  7.    ClientLeft      =   1605
  8.    ClientTop       =   1890
  9.    ClientWidth     =   6735
  10.    Height          =   4305
  11.    Icon            =   HINTDIAL.FRX:0000
  12.    Left            =   1560
  13.    LinkTopic       =   "Form1"
  14.    ScaleHeight     =   540
  15.    ScaleWidth      =   540
  16.    Top             =   1560
  17.    Width           =   6825
  18.    Begin SSCommand biClose 
  19.       Caption         =   "&Close"
  20.       Font3D          =   3  'Inset w/light shading
  21.       Height          =   495
  22.       Left            =   5640
  23.       RoundedCorners  =   0   'False
  24.       TabIndex        =   3
  25.       Top             =   120
  26.       Width           =   975
  27.    End
  28.    Begin TextBox Hint 
  29.       BackColor       =   &H00808000&
  30.       FontBold        =   0   'False
  31.       FontItalic      =   0   'False
  32.       FontName        =   "Fixedsys"
  33.       FontSize        =   9
  34.       FontStrikethru  =   0   'False
  35.       FontUnderline   =   0   'False
  36.       ForeColor       =   &H00000000&
  37.       Height          =   3135
  38.       Left            =   150
  39.       MousePointer    =   1  'Arrow
  40.       MultiLine       =   -1  'True
  41.       ScrollBars      =   2  'Vertical
  42.       TabIndex        =   2
  43.       Tag             =   "OL"
  44.       Text            =   "Hint"
  45.       Top             =   660
  46.       Width           =   6495
  47.    End
  48.    Begin PictureBox Logo 
  49.       AutoSize        =   -1  'True
  50.       Height          =   495
  51.       Left            =   120
  52.       Picture         =   HINTDIAL.FRX:0302
  53.       ScaleHeight     =   465
  54.       ScaleWidth      =   480
  55.       TabIndex        =   0
  56.       Top             =   120
  57.       Width           =   510
  58.    End
  59.    Begin Label Label1 
  60.       AutoSize        =   -1  'True
  61.       BackStyle       =   0  'Transparent
  62.       Caption         =   "VBstrAPI.DLL Demonstration Application Hint"
  63.       FontBold        =   -1  'True
  64.       FontItalic      =   0   'False
  65.       FontName        =   "MS Sans Serif"
  66.       FontSize        =   9.75
  67.       FontStrikethru  =   0   'False
  68.       FontUnderline   =   0   'False
  69.       Height          =   240
  70.       Left            =   690
  71.       TabIndex        =   1
  72.       Top             =   360
  73.       Width           =   4650
  74.    End
  75. Option Explicit
  76. Sub biClose_Click ()
  77.     Hint.Text = ""
  78.     Unload Me
  79. End Sub
  80. Sub CenterForm (TheForm As Form, OffsetLeft As Integer, OffsetTop As Integer)
  81. Dim FLeft As Integer
  82. Dim FTop As Integer
  83.     If TheForm.WindowState <> 0 Then Exit Sub
  84.     FLeft = ((Screen.Width - TheForm.Width) \ 2) + OffsetLeft
  85.     FTop = (((Screen.Height - TheForm.Height) \ 2) + OffsetTop) * .85
  86.     If TheForm.Left = FLeft And TheForm.Top = FTop Then Exit Sub
  87.     TheForm.Move FLeft, FTop
  88. End Sub
  89. Sub Form_Load ()
  90.     CenterForm Me, 0, 0
  91. End Sub
  92. Sub Form_Paint ()
  93.     Outlines Me
  94. End Sub
  95. Sub Hint_KeyPress (KeyAscii As Integer)
  96.     KeyAscii = 0
  97. End Sub
  98. Sub Outlines (FormName As Form)
  99. Dim drkgray     As Long
  100. Dim fullwhite   As Long
  101. Dim i           As Integer
  102. Dim ctop        As Integer
  103. Dim cleft       As Integer
  104. Dim cright      As Integer
  105. Dim cbottom     As Integer
  106. Dim Offset      As Integer
  107.     On Error Resume Next
  108.     Dim cName As Control
  109.     Offset = 0
  110.     FormName.Cls
  111.     drkgray = RGB(128, 128, 128)
  112.     fullwhite = RGB(255, 255, 255)
  113.     For i = 0 To (FormName.Controls.Count - 1)
  114.         
  115.         Set cName = FormName.Controls(i)
  116.         If TypeOf cName Is Menu Then
  117.             GoTo SkipThisControl
  118.             
  119.         End If
  120.             
  121.         
  122.         If (UCase(cName.Tag) = "OL") Then
  123.                 
  124.             ctop = cName.Top - Screen.TwipsPerPixelY
  125.             cleft = cName.Left - Screen.TwipsPerPixelX
  126.             cright = cName.Left + cName.Width + (Screen.TwipsPerPixelX * Offset)
  127.             cbottom = cName.Top + cName.Height + (Screen.TwipsPerPixelY * Offset)
  128.             
  129.             FormName.Line (cleft, ctop)-(cright, ctop), drkgray
  130.             FormName.Line (cleft, ctop)-(cleft, cbottom), drkgray
  131.             FormName.Line (cleft, cbottom)-(cright, cbottom), fullwhite
  132.             FormName.Line (cright, ctop)-(cright, cbottom), fullwhite
  133.         
  134.         End If
  135. SkipThisControl:
  136.     Next i
  137. End Sub
  138.