home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch06 / txtprint / txtprint.frm (.txt) next >
Encoding:
Visual Basic Form  |  1997-02-20  |  1.5 KB  |  41 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Print Method"
  4.    ClientHeight    =   4095
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   6855
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   13.5
  11.       Charset         =   0
  12.       Weight          =   400
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    ScaleHeight     =   4095
  19.    ScaleWidth      =   6855
  20.    StartUpPosition =   3  'Windows Default
  21. Attribute VB_Name = "Form1"
  22. Attribute VB_GlobalNameSpace = False
  23. Attribute VB_Creatable = False
  24. Attribute VB_PredeclaredId = True
  25. Attribute VB_Exposed = False
  26. Private Sub Form_Load()
  27.     Form1.Show
  28.     Form1.CurrentX = (Form1.Width - TextWidth("Centered Text")) / 2
  29.     Form1.CurrentY = (Form1.Height - TextHeight("Centered Text")) / 2
  30.     Form1.Print "Centered Text"
  31.     Form1.CurrentX = (Form1.Width - TextWidth("Centered Text")) / 2
  32.     Form1.CurrentY = (Form1.Height - TextHeight("Centered Text")) / 2
  33.     Form1.Line -Step(TextWidth("Centered Text"), TextHeight("Centered Text")), , B
  34.     Form1.CurrentX = 0
  35.     Form1.CurrentY = 0
  36.     Form1.Print "Top Left"
  37.     Form1.CurrentX = Form1.Width - TextWidth("Bottom Right") - 300
  38.     Form1.CurrentY = Form1.Height - TextHeight("Bottom Right") - 500
  39.     Form1.Print "Bottom Right"
  40. End Sub
  41.