home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / various / vbstra / hintdial.frm < prev    next >
Text File  |  1995-02-19  |  4KB  |  170 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. End
  76. Option Explicit
  77.  
  78. Sub biClose_Click ()
  79.  
  80.     Hint.Text = ""
  81.     Unload Me
  82.  
  83. End Sub
  84.  
  85. Sub CenterForm (TheForm As Form, OffsetLeft As Integer, OffsetTop As Integer)
  86. Dim FLeft As Integer
  87. Dim FTop As Integer
  88.     
  89.     If TheForm.WindowState <> 0 Then Exit Sub
  90.     
  91.     FLeft = ((Screen.Width - TheForm.Width) \ 2) + OffsetLeft
  92.     FTop = (((Screen.Height - TheForm.Height) \ 2) + OffsetTop) * .85
  93.     
  94.     If TheForm.Left = FLeft And TheForm.Top = FTop Then Exit Sub
  95.     
  96.     TheForm.Move FLeft, FTop
  97.  
  98. End Sub
  99.  
  100. Sub Form_Load ()
  101.  
  102.     CenterForm Me, 0, 0
  103.  
  104. End Sub
  105.  
  106. Sub Form_Paint ()
  107.  
  108.     Outlines Me
  109.  
  110. End Sub
  111.  
  112. Sub Hint_KeyPress (KeyAscii As Integer)
  113.  
  114.     KeyAscii = 0
  115.  
  116. End Sub
  117.  
  118. Sub Outlines (FormName As Form)
  119.     
  120. Dim drkgray     As Long
  121. Dim fullwhite   As Long
  122. Dim i           As Integer
  123. Dim ctop        As Integer
  124. Dim cleft       As Integer
  125. Dim cright      As Integer
  126. Dim cbottom     As Integer
  127. Dim Offset      As Integer
  128.  
  129.     On Error Resume Next
  130.     
  131.     Dim cName As Control
  132.     Offset = 0
  133.  
  134.     FormName.Cls
  135.     
  136.     drkgray = RGB(128, 128, 128)
  137.     fullwhite = RGB(255, 255, 255)
  138.  
  139.     For i = 0 To (FormName.Controls.Count - 1)
  140.         
  141.         Set cName = FormName.Controls(i)
  142.  
  143.         If TypeOf cName Is Menu Then
  144.  
  145.             GoTo SkipThisControl
  146.             
  147.         End If
  148.             
  149.         
  150.         If (UCase(cName.Tag) = "OL") Then
  151.                 
  152.             ctop = cName.Top - Screen.TwipsPerPixelY
  153.             cleft = cName.Left - Screen.TwipsPerPixelX
  154.             cright = cName.Left + cName.Width + (Screen.TwipsPerPixelX * Offset)
  155.             cbottom = cName.Top + cName.Height + (Screen.TwipsPerPixelY * Offset)
  156.             
  157.             FormName.Line (cleft, ctop)-(cright, ctop), drkgray
  158.             FormName.Line (cleft, ctop)-(cleft, cbottom), drkgray
  159.             FormName.Line (cleft, cbottom)-(cright, cbottom), fullwhite
  160.             FormName.Line (cright, ctop)-(cright, cbottom), fullwhite
  161.         
  162.         End If
  163.  
  164. SkipThisControl:
  165.     
  166.     Next i
  167.  
  168. End Sub
  169.  
  170.