home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Programmer'…arterly (Limited Edition) / Visual_Basic_Programmers_Journal_VB-CD_Quarterly_Limited_Edition_1995.iso / code / ch26code / frminfo.frm (.txt) < prev    next >
Visual Basic Form  |  1995-05-14  |  3KB  |  73 lines

  1. VERSION 4.00
  2. Begin VB.Form frmInfo 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Object Information"
  6.    ClientHeight    =   1125
  7.    ClientLeft      =   2670
  8.    ClientTop       =   1590
  9.    ClientWidth     =   3090
  10.    BeginProperty Font 
  11.       name            =   "Courier New"
  12.       charset         =   1
  13.       weight          =   400
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    Height          =   1530
  20.    Left            =   2610
  21.    LinkTopic       =   "Form1"
  22.    ScaleHeight     =   1125
  23.    ScaleWidth      =   3090
  24.    Top             =   1245
  25.    Width           =   3210
  26.    Begin VB.CommandButton cmd 
  27.       Caption         =   "Close"
  28.       Default         =   -1  'True
  29.       BeginProperty Font 
  30.          name            =   "MS Sans Serif"
  31.          charset         =   1
  32.          weight          =   700
  33.          size            =   8.25
  34.          underline       =   0   'False
  35.          italic          =   0   'False
  36.          strikethrough   =   0   'False
  37.       EndProperty
  38.       Height          =   375
  39.       Left            =   900
  40.       TabIndex        =   0
  41.       Top             =   630
  42.       Width           =   1185
  43.    End
  44. Attribute VB_Name = "frmInfo"
  45. Attribute VB_Creatable = False
  46. Attribute VB_Exposed = False
  47. '*********************************************************************
  48. ' FRMINFO.FRM - This is essentially a "stupid" dialog used by
  49. '               frmExcel. Its only purpose is to display information.
  50. '*********************************************************************
  51. Option Explicit
  52. '*********************************************************************
  53. ' Inialize the form so that it can hold 10, 40 char lines.
  54. '*********************************************************************
  55. Private Sub Form_Load()
  56.     '*****************************************************************
  57.     ' Get the height and width of a character to set the form size.
  58.     '*****************************************************************
  59.     Width = TextWidth(String(50, "X"))
  60.     Height = TextHeight("X") * 14
  61.     '*****************************************************************
  62.     ' Move the command button to the bottom center of the form.
  63.     '*****************************************************************
  64.     cmd.Move (ScaleWidth - cmd.Width) / 2, ScaleHeight - cmd.Height - 10
  65.     Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
  66. End Sub
  67. '*********************************************************************
  68. ' Always unload this form, since it loads so fast.
  69. '*********************************************************************
  70. Private Sub cmd_Click()
  71.     Unload Me
  72. End Sub
  73.