home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / comdem / aboutdlg.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-05-08  |  2.4 KB  |  78 lines

  1. VERSION 2.00
  2. Begin Form AboutDlg 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "About Communication Demo"
  5.    ClientHeight    =   675
  6.    ClientLeft      =   1695
  7.    ClientTop       =   2565
  8.    ClientWidth     =   4080
  9.    Height          =   1080
  10.    Icon            =   0
  11.    Left            =   1635
  12.    LinkMode        =   1  'Source
  13.    LinkTopic       =   "Form2"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   675
  17.    ScaleWidth      =   4080
  18.    Top             =   2220
  19.    Width           =   4200
  20.    Begin CommandButton Command1 
  21.       Caption         =   "OK"
  22.       Height          =   315
  23.       Left            =   1320
  24.       TabIndex        =   0
  25.       Top             =   210
  26.       Width           =   1500
  27.    End
  28. Sub Command1_Click ()
  29.     Unload AboutDlg
  30. End Sub
  31. Sub Form_Load ()
  32.     Remove_Items_From_SysMenu AboutDlg
  33.     Initialize
  34.     Height = Command1.top + (Command1.Height * 1.5) + (Height - ScaleHeight)
  35.     CenterDialog AboutDlg
  36. End Sub
  37. Sub Form_Paint ()
  38.     Initialize
  39.     UpdateCaption " DIALOG: " + Caption, 0
  40. End Sub
  41. Sub Initialize ()
  42.     Dim NewLeft     As Integer
  43.     Dim NewTop      As Integer
  44.     Dim Counter     As Integer
  45.     Dim MaxWidth    As Integer
  46.     Static Text$(0 To 5)
  47.     Static Size(0 To 5) As Integer
  48.     Text$(0) = "Communication Demo"
  49.     Text$(1) = "written in"
  50.     Text$(2) = "Microsoft Visual Basic Programming System"
  51.     Text$(3) = "Version 1.00"
  52.     Text$(4) = "for"
  53.     Text$(5) = "Microsoft Windows 3.00"
  54.     Size(0) = 24
  55.     Size(1) = 12
  56.     Size(2) = 12
  57.     Size(3) = 12
  58.     Size(4) = 12
  59.     Size(5) = 12
  60.     CurrentY = Command1.Height / 2
  61.     MaxWidth = TextWidth(Caption)
  62.     For Counter = 0 To 5
  63.         FontSize = Size(Counter)
  64.         
  65.         WorkWidth = TextWidth(Text$(Counter))
  66.         If WorkWidth > MaxWidth Then MaxWidth = WorkWidth
  67.         CurrentX = (ScaleWidth - WorkWidth) / 2
  68.         
  69.         Print Text$(Counter);
  70.         CurrentY = CurrentY + TextHeight(Text$(Counter))
  71.     Next Counter
  72.     Line ((ScaleWidth - MaxWidth) / 2, CurrentY)-(((ScaleWidth - MaxWidth) / 2) + MaxWidth, CurrentY + 30), QBColor(0), BF
  73.     width = MaxWidth + Command1.width
  74.     NewLeft = (ScaleWidth - Command1.width) / 2
  75.     NewTop = CurrentY + Command1.Height
  76.     Command1.Move NewLeft, NewTop
  77. End Sub
  78.