home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 17 / IOPROG_17.ISO / soft / msmeg2.exe / ROTEXTS2.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-10-30  |  6.2 KB  |  204 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "RoText Printing Sample"
  7.    ClientHeight    =   1755
  8.    ClientLeft      =   1125
  9.    ClientTop       =   1860
  10.    ClientWidth     =   5535
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   0
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   2160
  22.    Left            =   1065
  23.    LinkTopic       =   "Form1"
  24.    MaxButton       =   0   'False
  25.    MinButton       =   0   'False
  26.    ScaleHeight     =   1755
  27.    ScaleWidth      =   5535
  28.    Top             =   1515
  29.    Width           =   5655
  30.    Begin VB.CommandButton Command1 
  31.       Appearance      =   0  'Flat
  32.       BackColor       =   &H80000005&
  33.       Caption         =   "Print"
  34.       Default         =   -1  'True
  35.       BeginProperty Font 
  36.          name            =   "MS Sans Serif"
  37.          charset         =   0
  38.          weight          =   400
  39.          size            =   8.25
  40.          underline       =   0   'False
  41.          italic          =   0   'False
  42.          strikethrough   =   0   'False
  43.       EndProperty
  44.       Height          =   375
  45.       Left            =   3840
  46.       TabIndex        =   5
  47.       Top             =   240
  48.       Width           =   1455
  49.    End
  50.    Begin VB.CommandButton btnExit 
  51.       Appearance      =   0  'Flat
  52.       BackColor       =   &H80000005&
  53.       Cancel          =   -1  'True
  54.       Caption         =   "Exit"
  55.       BeginProperty Font 
  56.          name            =   "MS Sans Serif"
  57.          charset         =   0
  58.          weight          =   400
  59.          size            =   8.25
  60.          underline       =   0   'False
  61.          italic          =   0   'False
  62.          strikethrough   =   0   'False
  63.       EndProperty
  64.       Height          =   375
  65.       Left            =   3840
  66.       TabIndex        =   4
  67.       Top             =   720
  68.       Width           =   1455
  69.    End
  70.    Begin VB.TextBox txtCount 
  71.       Appearance      =   0  'Flat
  72.       Height          =   285
  73.       Left            =   240
  74.       TabIndex        =   3
  75.       Text            =   "5"
  76.       Top             =   1200
  77.       Width           =   3255
  78.    End
  79.    Begin VB.TextBox txtPrint 
  80.       Appearance      =   0  'Flat
  81.       Height          =   285
  82.       Left            =   240
  83.       TabIndex        =   1
  84.       Text            =   "The quick brown fox ..."
  85.       Top             =   480
  86.       Width           =   3255
  87.    End
  88.    Begin ROTEXTLib.Rotext Rotext1 
  89.       Height          =   495
  90.       Left            =   3600
  91.       TabIndex        =   6
  92.       Top             =   1200
  93.       Visible         =   0   'False
  94.       Width           =   1935
  95.       _Version        =   131072
  96.       _ExtentX        =   3413
  97.       _ExtentY        =   873
  98.       _StockProps     =   79
  99.       Caption         =   "Rotext1"
  100.       BackColor       =   -2147483643
  101.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  102.          name            =   "Arial"
  103.          charset         =   0
  104.          weight          =   700
  105.          size            =   24
  106.          underline       =   0   'False
  107.          italic          =   0   'False
  108.          strikethrough   =   0   'False
  109.       EndProperty
  110.       BackStyle       =   0
  111.    End
  112.    Begin VB.Label Label2 
  113.       Appearance      =   0  'Flat
  114.       BackColor       =   &H00C0C0C0&
  115.       Caption         =   "Number of Items:"
  116.       BeginProperty Font 
  117.          name            =   "MS Sans Serif"
  118.          charset         =   0
  119.          weight          =   400
  120.          size            =   8.25
  121.          underline       =   0   'False
  122.          italic          =   0   'False
  123.          strikethrough   =   0   'False
  124.       EndProperty
  125.       ForeColor       =   &H80000008&
  126.       Height          =   255
  127.       Left            =   240
  128.       TabIndex        =   2
  129.       Top             =   960
  130.       Width           =   1575
  131.    End
  132.    Begin VB.Label Label1 
  133.       Appearance      =   0  'Flat
  134.       BackColor       =   &H00C0C0C0&
  135.       Caption         =   "Text to Print:"
  136.       BeginProperty Font 
  137.          name            =   "MS Sans Serif"
  138.          charset         =   0
  139.          weight          =   400
  140.          size            =   8.25
  141.          underline       =   0   'False
  142.          italic          =   0   'False
  143.          strikethrough   =   0   'False
  144.       EndProperty
  145.       ForeColor       =   &H80000008&
  146.       Height          =   255
  147.       Left            =   240
  148.       TabIndex        =   0
  149.       Top             =   240
  150.       Width           =   1695
  151.    End
  152. Attribute VB_Name = "Form1"
  153. Attribute VB_Creatable = False
  154. Attribute VB_Exposed = False
  155. Option Explicit
  156. Private Sub btnExit_Click()
  157.    ' get out
  158.    End
  159.    End Sub
  160. Private Sub Command1_Click()
  161.    Dim Count As Integer
  162.    Dim I As Long
  163.    Command1.Enabled = False
  164.    btnExit.Enabled = False
  165.    ' let the user know we're busy
  166.    Screen.MousePointer = 11
  167.    Count = Val(txtCount)
  168.    If Count <= 0 Then
  169.       Count = 1
  170.       End If
  171.    Printer.Print
  172.    Printer.ScaleMode = 1
  173.    ' record what we did
  174.    Printer.FontName = "Arial"
  175.    Printer.CurrentX = 1440
  176.    Printer.CurrentY = 1440
  177.    Printer.FontSize = 18
  178.    Printer.FontBold = True
  179.    Printer.Print Count & " times " & Chr(34) & txtPrint & Chr(34)
  180.    ' set up RoText and print area
  181.    Rotext1.Caption = txtPrint
  182.    Rotext1.PrinterTop = 1440
  183.    Rotext1.PrinterLeft = 1440
  184.    Rotext1.PrinterWidth = 6.5 * 1440
  185.    Rotext1.PrinterHeight = 9 * 1440
  186.    Rotext1.PrinterScaleMode = Printer.ScaleMode
  187.    ' print rotated text
  188.    For I = 0 To Count - 1
  189.       DoEvents
  190.       Rotext1.Angle = (180& * I) / Count
  191.       Rotext1.PrinterHDC = Printer.hDC
  192.       Next I
  193. '   Printer.Print
  194.    Printer.EndDoc
  195.    Command1.Enabled = True
  196.    btnExit.Enabled = True
  197.    ' OK, we're done now
  198.    Screen.MousePointer = 0
  199.    End Sub
  200. Private Sub Form_Unload(Cancel As Integer)
  201.     ' get out
  202.     End
  203. End Sub
  204.