home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BorderStyle = 3 'Fixed Double
- Caption = "RoText Printing Sample"
- ClientHeight = 1755
- ClientLeft = 1125
- ClientTop = 1860
- ClientWidth = 5535
- Height = 2160
- Left = 1065
- LinkTopic = "Form1"
- ScaleHeight = 1755
- ScaleWidth = 5535
- Top = 1515
- Width = 5655
- Begin CommandButton Command1
- Caption = "Print"
- Default = -1 'True
- Height = 375
- Left = 3840
- TabIndex = 5
- Top = 720
- Width = 1455
- End
- Begin CommandButton btnExit
- Cancel = -1 'True
- Caption = "Exit"
- Height = 375
- Left = 3840
- TabIndex = 4
- Top = 240
- Width = 1455
- End
- Begin TextBox txtCount
- Height = 285
- Left = 240
- TabIndex = 3
- Top = 1200
- Width = 3255
- End
- Begin TextBox txtPrint
- Height = 285
- Left = 240
- TabIndex = 1
- Text = "The quick brown fox ..."
- Top = 480
- Width = 3255
- End
- Begin RoText RoText1
- Angle = 0
- Caption = "RoText1"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 24
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 3480
- TabIndex = 6
- Top = 1200
- Visible = 0 'False
- Width = 2055
- End
- Begin Label Label2
- Caption = "Number of Items:"
- Height = 255
- Left = 240
- TabIndex = 2
- Top = 960
- Width = 1575
- End
- Begin Label Label1
- Caption = "Text to Print:"
- Height = 255
- Left = 240
- TabIndex = 0
- Top = 240
- Width = 1695
- End
- Option Explicit
- Sub btnExit_Click ()
- ' get out
- End
- End Sub
- Sub Command1_Click ()
- Dim Count As Integer
- Dim I As Long
- ' let the user know we're busy
- Form1.MousePointer = 11
- Count = Val(txtCount)
- If Count <= 0 Then
- Count = 1
- End If
- ' set up RoText and print area
- RoText1.Caption = txtPrint
- RoText1.PrinterTop = 1440
- RoText1.PrinterLeft = 1440
- RoText1.PrinterWidth = 6.5 * 1440
- RoText1.PrinterHeight = 9 * 1440
- RoText1.PrinterScaleMode = Printer.ScaleMode
- ' print rotated text
- For I = 0 To Count - 1
- DoEvents
- RoText1.Angle = (360& * I) / Count
- RoText1.PrinterHDC = Printer.hDC
- Next I
- ' record what we did
- Printer.CurrentX = 1440
- Printer.CurrentY = 1440
- Printer.FontName = "Arial"
- Printer.FontSize = 18
- Printer.FontBold = True
- Printer.Print Count & " times " & Chr(34) & txtPrint & Chr(34)
- Printer.EndDoc
- ' OK, we're done now
- Form1.MousePointer = 0
- End Sub
- Sub Form_Unload (Cancel As Integer)
- ' get out
- End
- End Sub
-