home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "RoText Printing Sample"
- ClientHeight = 1755
- ClientLeft = 1125
- ClientTop = 1860
- ClientWidth = 5535
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 2160
- Left = 1065
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 1755
- ScaleWidth = 5535
- Top = 1515
- Width = 5655
- Begin VB.CommandButton Command1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Print"
- Default = -1 'True
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 3840
- TabIndex = 5
- Top = 240
- Width = 1455
- End
- Begin VB.CommandButton btnExit
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Cancel = -1 'True
- Caption = "Exit"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 3840
- TabIndex = 4
- Top = 720
- Width = 1455
- End
- Begin VB.TextBox txtCount
- Appearance = 0 'Flat
- Height = 285
- Left = 240
- TabIndex = 3
- Text = "5"
- Top = 1200
- Width = 3255
- End
- Begin VB.TextBox txtPrint
- Appearance = 0 'Flat
- Height = 285
- Left = 240
- TabIndex = 1
- Text = "The quick brown fox ..."
- Top = 480
- Width = 3255
- End
- Begin ROTEXTLib.Rotext Rotext1
- Height = 495
- Left = 3600
- TabIndex = 6
- Top = 1200
- Visible = 0 'False
- Width = 1935
- _Version = 131072
- _ExtentX = 3413
- _ExtentY = 873
- _StockProps = 79
- Caption = "Rotext1"
- BackColor = -2147483643
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Arial"
- charset = 0
- weight = 700
- size = 24
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BackStyle = 0
- End
- Begin VB.Label Label2
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "Number of Items:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 255
- Left = 240
- TabIndex = 2
- Top = 960
- Width = 1575
- End
- Begin VB.Label Label1
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "Text to Print:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 255
- Left = 240
- TabIndex = 0
- Top = 240
- Width = 1695
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub btnExit_Click()
- ' get out
- End
- End Sub
- Private Sub Command1_Click()
- Dim Count As Integer
- Dim I As Long
- Command1.Enabled = False
- btnExit.Enabled = False
- ' let the user know we're busy
- Screen.MousePointer = 11
- Count = Val(txtCount)
- If Count <= 0 Then
- Count = 1
- End If
- Printer.Print
- Printer.ScaleMode = 1
- ' record what we did
- Printer.FontName = "Arial"
- Printer.CurrentX = 1440
- Printer.CurrentY = 1440
- Printer.FontSize = 18
- Printer.FontBold = True
- Printer.Print Count & " times " & Chr(34) & txtPrint & Chr(34)
- ' 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 = (180& * I) / Count
- Rotext1.PrinterHDC = Printer.hDC
- Next I
- ' Printer.Print
- Printer.EndDoc
- Command1.Enabled = True
- btnExit.Enabled = True
- ' OK, we're done now
- Screen.MousePointer = 0
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- ' get out
- End
- End Sub
-