home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / str_plus / textjust.frm < prev    next >
Text File  |  1994-07-19  |  3KB  |  94 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. End
  48.  
  49. Sub Command1_Click ()
  50.     Unload Me
  51. End Sub
  52.  
  53. Sub Form_Load ()
  54.     FormCenterScreen Me
  55.     Screen.MousePointer = 0
  56. End Sub
  57.  
  58. Sub Form_Paint ()
  59.     DoForm3D Me, sunken, 3, 0
  60.     DoForm3D Me, raised, 1, 3
  61.  
  62.     Picture1.ScaleMode = 3
  63.     Picture1.FontName = "Arial"
  64.     Picture1.FontSize = 12
  65.     Picture1.ForeColor = QBColor(0)
  66.     msg$ = "This example demonstrates how to justify text between"
  67.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  68.  
  69.     Picture1.Print
  70.     msg$ = "the margins of a PictureBox.  The routine can"
  71.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  72.     Picture1.Print
  73.     msg$ = "accommodate VB forms too.  This function allows you to"
  74.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  75.     Picture1.Print
  76.     msg$ = "present information in an eye-appealing manner."
  77.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  78.     Picture1.Print
  79.  
  80.     Picture1.Print
  81.     Picture1.FontName = "Times New Roman"
  82.     Picture1.FontSize = 16
  83.     Picture1.ForeColor = QBColor(1)
  84.     msg$ = "Yes!  With a little creativity and"
  85.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  86.     Picture1.Print
  87.     msg$ = "some programming expertise you could"
  88.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  89.     Picture1.Print
  90.     msg$ = "even write a small word-processor yourself."
  91.     JustifyLine Picture1.hDC, Picture1.CurrentX, Picture1.CurrentY, Picture1.ScaleWidth, msg$
  92. End Sub
  93.  
  94.