home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Power Pack / Visual_Basic4_Power_Pack.bin / vb4files / 3dfxplus / textjust.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-11-20  |  3.2 KB  |  90 lines

  1. VERSION 2.00
  2. Begin Form TextJust 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Text Justification"
  6.    ClientHeight    =   4020
  7.    ClientLeft      =   1095
  8.    ClientTop       =   1485
  9.    ClientWidth     =   7365
  10.    ControlBox      =   0   'False
  11.    Height          =   4425
  12.    Left            =   1035
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   4020
  16.    ScaleWidth      =   7365
  17.    Top             =   1140
  18.    Width           =   7485
  19.    Begin PictureBox Picture1 
  20.       BackColor       =   &H00C0C0C0&
  21.       BorderStyle     =   0  'None
  22.       Height          =   2655
  23.       Left            =   360
  24.       ScaleHeight     =   177
  25.       ScaleMode       =   3  'Pixel
  26.       ScaleWidth      =   441
  27.       TabIndex        =   1
  28.       Top             =   360
  29.       Width           =   6615
  30.    End
  31.    Begin CommandButton Command1 
  32.       Cancel          =   -1  'True
  33.       Caption         =   "O &K A Y"
  34.       Default         =   -1  'True
  35.       FontBold        =   -1  'True
  36.       FontItalic      =   0   'False
  37.       FontName        =   "MS Sans Serif"
  38.       FontSize        =   12
  39.       FontStrikethru  =   0   'False
  40.       FontUnderline   =   0   'False
  41.       Height          =   495
  42.       Left            =   360
  43.       TabIndex        =   0
  44.       Top             =   3240
  45.       Width           =   6735
  46.    End
  47. Sub Command1_Click ()
  48.     Unload Me
  49. End Sub
  50. Sub Form_Load ()
  51.     ScreenCenterWindow Me.hWnd
  52.     SetPictureBoxBorder "none"
  53.     Window3Dfx Me.hWnd
  54.     Screen.MousePointer = 0
  55. End Sub
  56. Sub Form_Paint ()
  57.     Draw3DWindowBox Me.hWnd, 3, "SunkenDouble"
  58.     Picture1.ScaleMode = 3
  59.     Picture1.FontName = "Arial"
  60.     Picture1.FontSize = 12
  61.     Picture1.ForeColor = QBColor(0)
  62.     msg$ = "This example demonstrates how to justify text between"
  63.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  64.     Picture1.Print
  65.     msg$ = "the margins of a PictureBox.  The routine can"
  66.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  67.     Picture1.Print
  68.     msg$ = "accommodate VB forms too.  This function allows you to"
  69.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  70.     Picture1.Print
  71.     msg$ = "present information in an eye-appealing manner."
  72.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  73.     Picture1.Print
  74.     Picture1.Print
  75.     Picture1.FontName = "Times New Roman"
  76.     Picture1.FontSize = 16
  77.     Picture1.ForeColor = QBColor(1)
  78.     msg$ = "Yes!  With a little creativity and"
  79.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  80.     Picture1.Print
  81.     msg$ = "some programming expertise you could"
  82.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  83.     Picture1.Print
  84.     msg$ = "even write a small word-processor yourself."
  85.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  86. End Sub
  87. Sub Form_Unload (Cancel As Integer)
  88.     SetPictureBoxBorder "sunken"
  89. End Sub
  90.