home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / design / vsview / fezprint.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-02-27  |  19.7 KB  |  604 lines

  1. VERSION 2.00
  2. Begin Form fEZPrint 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Replacement for the Printer Object"
  6.    ClientHeight    =   6525
  7.    ClientLeft      =   675
  8.    ClientTop       =   390
  9.    ClientWidth     =   7425
  10.    Height          =   7050
  11.    Left            =   615
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   6525
  16.    ScaleWidth      =   7425
  17.    Top             =   -75
  18.    Width           =   7545
  19.    Begin vsViewPort vsViewPort2 
  20.       BackColor       =   &H00808080&
  21.       Height          =   3795
  22.       Left            =   420
  23.       Top             =   1260
  24.       VirtualHeight   =   7410
  25.       VirtualWidth    =   0
  26.       Width           =   1905
  27.       Begin CommandButton Command1 
  28.          BackColor       =   &H00808080&
  29.          Caption         =   "Line by Line"
  30.          Height          =   645
  31.          Index           =   0
  32.          Left            =   105
  33.          TabIndex        =   16
  34.          Top             =   105
  35.          Width           =   1380
  36.       End
  37.       Begin CommandButton Command1 
  38.          BackColor       =   &H00808080&
  39.          Caption         =   "Paragraph"
  40.          Height          =   645
  41.          Index           =   1
  42.          Left            =   105
  43.          TabIndex        =   15
  44.          Top             =   840
  45.          Width           =   1380
  46.       End
  47.       Begin CommandButton Command1 
  48.          BackColor       =   &H00808080&
  49.          Caption         =   "Tables"
  50.          Height          =   645
  51.          Index           =   2
  52.          Left            =   105
  53.          TabIndex        =   14
  54.          Top             =   1575
  55.          Width           =   1380
  56.       End
  57.       Begin CommandButton Command1 
  58.          BackColor       =   &H00808080&
  59.          Caption         =   "Multi-Columns"
  60.          Height          =   645
  61.          Index           =   3
  62.          Left            =   105
  63.          TabIndex        =   13
  64.          Top             =   2310
  65.          Width           =   1380
  66.       End
  67.       Begin CommandButton Command1 
  68.          BackColor       =   &H00808080&
  69.          Caption         =   "Draw"
  70.          Height          =   645
  71.          Index           =   4
  72.          Left            =   105
  73.          TabIndex        =   12
  74.          Top             =   5250
  75.          Width           =   1380
  76.       End
  77.       Begin CommandButton Command1 
  78.          BackColor       =   &H00808080&
  79.          Caption         =   "&AlignText"
  80.          Height          =   645
  81.          Index           =   5
  82.          Left            =   105
  83.          TabIndex        =   11
  84.          Top             =   3045
  85.          Width           =   1380
  86.       End
  87.       Begin CommandButton Command1 
  88.          BackColor       =   &H00808080&
  89.          Caption         =   "&Indent"
  90.          Height          =   645
  91.          Index           =   6
  92.          Left            =   105
  93.          TabIndex        =   10
  94.          Top             =   3780
  95.          Width           =   1380
  96.       End
  97.       Begin CommandButton Command1 
  98.          BackColor       =   &H00808080&
  99.          Caption         =   "&Mail Merge"
  100.          Height          =   645
  101.          Index           =   7
  102.          Left            =   105
  103.          TabIndex        =   9
  104.          Top             =   4515
  105.          Width           =   1380
  106.       End
  107.       Begin CommandButton Command1 
  108.          BackColor       =   &H00808080&
  109.          Caption         =   "&Graphics"
  110.          Height          =   645
  111.          Index           =   8
  112.          Left            =   105
  113.          TabIndex        =   8
  114.          Top             =   5985
  115.          Width           =   1380
  116.       End
  117.       Begin CommandButton Command1 
  118.          BackColor       =   &H00808080&
  119.          Caption         =   "Angle"
  120.          Height          =   645
  121.          Index           =   10
  122.          Left            =   105
  123.          TabIndex        =   7
  124.          Top             =   6720
  125.          Width           =   1380
  126.       End
  127.    End
  128.    Begin CommandButton Command1 
  129.       BackColor       =   &H00C0C0C0&
  130.       Caption         =   "&Order Form"
  131.       Height          =   540
  132.       Index           =   9
  133.       Left            =   420
  134.       TabIndex        =   0
  135.       Top             =   5250
  136.       Width           =   1905
  137.    End
  138.    Begin ComboBox cmbOrientation 
  139.       Enabled         =   0   'False
  140.       Height          =   300
  141.       Left            =   3360
  142.       Style           =   2  'Dropdown List
  143.       TabIndex        =   1
  144.       Top             =   105
  145.       Width           =   1065
  146.    End
  147.    Begin CommandButton cmdPrint 
  148.       BackColor       =   &H00C0C0C0&
  149.       Caption         =   "&Print"
  150.       Enabled         =   0   'False
  151.       Height          =   330
  152.       Left            =   6195
  153.       TabIndex        =   3
  154.       Top             =   105
  155.       Width           =   1065
  156.    End
  157.    Begin vsViewPort vsViewPort1 
  158.       BackColor       =   &H00808080&
  159.       Height          =   5895
  160.       Left            =   2625
  161.       Top             =   525
  162.       VirtualHeight   =   0
  163.       VirtualWidth    =   0
  164.       Width           =   4635
  165.       Begin vsPrinter VSPrinter1 
  166.          AbortCaption    =   ""
  167.          BackColor       =   &H00FFFFFF&
  168.          BrushColor      =   &H0080FFFF&
  169.          FontName        =   "Arial"
  170.          FontSize        =   40
  171.          Footer          =   "||Page %d"
  172.          HdrColor        =   &H00800000&
  173.          HdrFontBold     =   -1  'True
  174.          HdrFontItalic   =   -1  'True
  175.          HdrFontName     =   "Arial"
  176.          HdrFontSize     =   24
  177.          Header          =   "|VideoSoft VSView"
  178.          Height          =   4005
  179.          Left            =   255
  180.          PenColor        =   &H00808080&
  181.          PenWidth        =   20
  182.          TableSep        =   "|;"
  183.          Top             =   210
  184.          Width           =   2850
  185.       End
  186.    End
  187.    Begin ComboBox cmbZoom 
  188.       Enabled         =   0   'False
  189.       Height          =   300
  190.       Left            =   5040
  191.       Style           =   2  'Dropdown List
  192.       TabIndex        =   2
  193.       Top             =   105
  194.       Width           =   960
  195.    End
  196.    Begin Label Label1 
  197.       Alignment       =   2  'Center
  198.       AutoSize        =   -1  'True
  199.       BackStyle       =   0  'Transparent
  200.       Caption         =   "Orient."
  201.       ForeColor       =   &H00000000&
  202.       Height          =   195
  203.       Index           =   2
  204.       Left            =   2730
  205.       TabIndex        =   6
  206.       Top             =   105
  207.       Width           =   615
  208.    End
  209.    Begin Label Label1 
  210.       Alignment       =   2  'Center
  211.       AutoSize        =   -1  'True
  212.       BackStyle       =   0  'Transparent
  213.       Caption         =   "Zoom"
  214.       ForeColor       =   &H00000000&
  215.       Height          =   195
  216.       Index           =   1
  217.       Left            =   4515
  218.       TabIndex        =   5
  219.       Top             =   105
  220.       Width           =   495
  221.    End
  222.    Begin Image Image1 
  223.       Height          =   375
  224.       Left            =   105
  225.       Picture         =   FEZPRINT.FRX:0000
  226.       Top             =   105
  227.       Width           =   345
  228.    End
  229.    Begin Label Label1 
  230.       Alignment       =   2  'Center
  231.       BackStyle       =   0  'Transparent
  232.       Caption         =   "VSPrinter: The Visual Printer"
  233.       FontBold        =   -1  'True
  234.       FontItalic      =   0   'False
  235.       FontName        =   "MS Sans Serif"
  236.       FontSize        =   13.5
  237.       FontStrikethru  =   0   'False
  238.       FontUnderline   =   0   'False
  239.       ForeColor       =   &H00800000&
  240.       Height          =   1275
  241.       Index           =   0
  242.       Left            =   630
  243.       TabIndex        =   4
  244.       Top             =   105
  245.       Width           =   1800
  246.    End
  247. Option Explicit
  248. Dim MyPage%         'Keep the output view to be printed
  249. Dim OldOrientation  'Don't mess with my printer settings
  250. Sub cmbOrientation_Click ()
  251.   mousepointer = 11
  252.   vsPrinter1.Orientation = cmbOrientation.ListIndex
  253.   cmbZoom_click
  254.   If MyPage >= 0 Then command1_click MyPage
  255.   mousepointer = 0
  256. End Sub
  257. Sub cmbZoom_click ()
  258.   vsPrinter1.Visible = False
  259.   mousepointer = 11
  260.   'Change the screen size to zoom value
  261.   vsPrinter1.Width = vsPrinter1.PageWidth * Val(cmbZoom) / 100
  262.   vsPrinter1.Height = vsPrinter1.PageHeight * Val(cmbZoom) / 100
  263.   vsViewPort1.VirtualWidth = vsPrinter1.Width + 400
  264.   vsViewPort1.VirtualHeight = vsPrinter1.Height + 400
  265.   ' center picture if it's small
  266.   If vsPrinter1.Width < vsViewPort1.Width Then vsPrinter1.Left = (vsViewPort1.Width - vsPrinter1.Width) / 2
  267.   If vsPrinter1.Height < vsViewPort1.Height Then vsPrinter1.Top = (vsViewPort1.Height - vsPrinter1.Height) / 2
  268.   mousepointer = 0
  269.   vsPrinter1.Visible = True
  270. End Sub
  271. Sub cmdPrint_Click ()
  272.   mousepointer = 11
  273.   ' Cancel Preview mode and print
  274.   vsPrinter1.Preview = False
  275.   command1_click MyPage
  276.   vsPrinter1.Preview = True
  277.   mousepointer = 0
  278. End Sub
  279. Sub command1_click (Index%)
  280.       
  281.   cmbZoom.Enabled = True
  282.   cmdPrint.Enabled = True
  283.   cmbOrientation.Enabled = True
  284.   MyPage = Index%
  285.   vsPrinter1.Action = 3 'Start Document
  286.   mousepointer = 11
  287.   Select Case Index
  288.     Case 0
  289.       DoLine
  290.     Case 1
  291.       DoParagraph
  292.     Case 2
  293.       DoTable
  294.     Case 3
  295.       DoColumns
  296.     Case 4
  297.       DoDrawing
  298.     Case 5
  299.       DoAlign
  300.     Case 6
  301.       DoIndent
  302.     Case 7
  303.       DoMailMerge "Joe Smith", "Chief Financial Officer"
  304.       DoMailMerge "Mary Kerney", "President"
  305.     Case 8
  306.       DoGraphics
  307.     Case 9
  308.       DoOrder
  309.     Case 10
  310.       DoAngle
  311.   End Select
  312.   vsPrinter1.Action = 6 'End Document
  313.   mousepointer = 0
  314. End Sub
  315. Sub DoAlign ()
  316.       
  317.       vsPrinter1.SpaceAfter = 500
  318.       vsPrinter1.TextColor = QBColor(1)
  319.       vsPrinter1.TextAlign = 1  'Center
  320.       vsPrinter1.FontUnderline = True
  321.       vsPrinter1.Paragraph = ""
  322.       vsPrinter1.Paragraph = "VSPrinter automatically aligns proportional fonts"
  323.       vsPrinter1.FontUnderline = False
  324.       
  325.       vsPrinter1.TextColor = QBColor(0)
  326.       vsPrinter1.CurrentY = vsPrinter1.PageHeight / 2
  327.       vsPrinter1.TextAlign = 2  'Rigth
  328.       vsPrinter1.Paragraph = "Text is right aligned"
  329.       vsPrinter1.TextAlign = 1  'Center
  330.       vsPrinter1.Paragraph = "Text is centered"
  331.       vsPrinter1.TextAlign = 0  'Left
  332.       vsPrinter1.Paragraph = "Text is left aligned"
  333.       vsPrinter1.SpaceAfter = 0
  334. End Sub
  335. Sub DoAngle ()
  336.   Dim i%, j%
  337.       vsPrinter1.TextAngle = 450
  338.       vsPrinter1 = ""
  339.       vsPrinter1 = ""
  340.       vsPrinter1 = ""
  341.       vsPrinter1 = ""
  342.       vsPrinter1 = "Rotate text"
  343.       vsPrinter1 = "to any angle"
  344.       
  345.       'Rotate Text
  346.       j = 1
  347.       For i = 450 To 3600 Step 900
  348.         vsPrinter1.TextColor = QBColor(j)
  349.         vsPrinter1.CurrentX = vsPrinter1.PageWidth * .5
  350.         vsPrinter1.CurrentY = vsPrinter1.PageHeight * .5
  351.         vsPrinter1.TextAngle = i
  352.         vsPrinter1.Text = "VSView"
  353.         j = j + 1
  354.       Next
  355.       vsPrinter1.TextAngle = 0
  356.       vsPrinter1.TextColor = 0
  357. End Sub
  358. Sub DoColumns ()
  359.       Dim s$, i%
  360.       s = "VSPrinter can also print in multiple columns. "
  361.       s = s + "You have control over column breaks, and you can save "
  362.       s = s + "a whole lot of paper by using multiple columns."
  363.       
  364.       
  365.       vsPrinter1.Columns = 2
  366.       vsPrinter1.PageBorder = 5
  367.       
  368.       
  369.       vsPrinter1.TextColor = QBColor(1)
  370.       vsPrinter1 = s
  371.       vsPrinter1 = ""
  372.       vsPrinter1.TextColor = QBColor(0)
  373.       vsPrinter1 = s
  374.       'Restore settings
  375.       vsPrinter1.Columns = 1
  376.       vsPrinter1.PageBorder = 3
  377. End Sub
  378. Sub DoDrawing ()
  379.       Dim s$, x%, y%
  380.       vsPrinter1.CurrentX = vsPrinter1.PageWidth / 2
  381.       vsPrinter1.CurrentY = vsPrinter1.PageHeight / 2
  382.       vsPrinter1.TextAlign = 1              ' Center
  383.       vsPrinter1.TextColor = &H800000       'Blue
  384.       vsPrinter1 = "Add graphics to your reports!"
  385.       vsPrinter1.TextColor = &H0&           'Black
  386.       vsPrinter1 = "With VSPrinter, it's easy!"
  387.       vsPrinter1.TextAlign = 0              ' Left
  388.       vsPrinter1.X1 = vsPrinter1.PageWidth / 4 * .25
  389.       vsPrinter1.Y1 = vsPrinter1.PageHeight / 4 * .25
  390.       vsPrinter1.X2 = vsPrinter1.PageWidth / 4 * 1.25
  391.       vsPrinter1.Y2 = vsPrinter1.PageHeight / 4 * 1.25
  392.       vsPrinter1.BrushColor = &HFF&         'Red
  393.       vsPrinter1.BrushStyle = 6             'Cross
  394.       vsPrinter1.Draw = 3                   'Circle
  395.       vsPrinter1.X1 = vsPrinter1.PageWidth * .7
  396.       vsPrinter1.Y1 = vsPrinter1.PageHeight * .7
  397.       vsPrinter1.X2 = vsPrinter1.PageWidth * .9
  398.       vsPrinter1.Y2 = vsPrinter1.PageHeight * .9
  399.       vsPrinter1.BrushColor = &H800080      'Purple
  400.       vsPrinter1.BrushStyle = 7             'Cross Diagonal
  401.       vsPrinter1.Draw = 2                   'Rect.
  402.       ' complex graphics
  403.       s = ""
  404.       For x = vsPrinter1.MarginLeft To vsPrinter1.PageWidth - vsPrinter1.MarginRight Step 20
  405.         y = 6000 + Cos(x * 3.1416 / 180) * (x - vsPrinter1.PageWidth / 2) / 10
  406.         s = s + Str(x) + Str(y)
  407.       Next
  408.       vsPrinter1.PenWidth = 10
  409.       vsPrinter1.PolyLine = s
  410.       vsPrinter1.PenWidth = 0
  411. End Sub
  412. Sub DoGraphics ()
  413.   Dim s$, fmt$
  414.   ' Print Title
  415.   vsPrinter1 = ""
  416.   vsPrinter1.CurrentX = 2500
  417.   vsPrinter1.TextColor = QBColor(1)
  418.   vsPrinter1 = "Metafiles and Bitmaps"
  419.   vsPrinter1.TextColor = QBColor(0)
  420.   vsPrinter1.FontSize = 28
  421.   vsPrinter1 = ""
  422.   vsPrinter1 = "You can now print and preview reports that includes bitmaps and metafiles.  With VSView, who needs desktop publishing. <g>"
  423.   vsPrinter1 = ""
  424.   'Place pictures--------------------------
  425.   vsPrinter1.X1 = 1000
  426.   vsPrinter1.Y1 = 1000
  427.   vsPrinter1.X2 = 2400
  428.   vsPrinter1.Y2 = 2400
  429.   vsPrinter1.Picture = ftoolbox!Picture1(1).Picture
  430.       
  431.   vsPrinter1.FontSize = 40
  432. End Sub
  433. Sub DoIndent ()
  434.   vsPrinter1.IndentFirst = 1000
  435.   vsPrinter1 = "You can automatically indent the FIRST LINE of the paragraph."
  436.   vsPrinter1 = ""
  437.   vsPrinter1.IndentFirst = 0
  438.   vsPrinter1.IndentLeft = 1000
  439.   vsPrinter1 = "You can automatically indent from the LEFT margin of the paragraph."
  440.   vsPrinter1 = ""
  441.   vsPrinter1.IndentLeft = 0
  442.   vsPrinter1.IndentRight = 1000
  443.   vsPrinter1 = "You can automatically indent from the RIGHT margin of the paragraph."
  444.   vsPrinter1 = ""
  445.   vsPrinter1.IndentLeft = 1000
  446.   vsPrinter1.IndentFirst = 1500
  447.   vsPrinter1 = "You can even combined all levels of indentation."
  448.   'Restore Values
  449.   vsPrinter1.IndentLeft = 0
  450.   vsPrinter1.IndentFirst = 0
  451.   vsPrinter1.IndentRight = 0
  452. End Sub
  453. Sub DoLine ()
  454.       
  455.       vsPrinter1.TextColor = 0
  456.       vsPrinter1 = ""
  457.       vsPrinter1.Text = "With VSPrinter you can print"
  458.       vsPrinter1.FontBold = True
  459.       vsPrinter1.TextColor = QBColor(2)
  460.       vsPrinter1.Text = " Line by Line"
  461.       vsPrinter1.TextColor = QBColor(0)
  462.       vsPrinter1.FontBold = False
  463.       vsPrinter1.Text = " just like you would in VB."
  464.       vsPrinter1.Text = " Text wraps automatically, so your life becomes easier."
  465. End Sub
  466. Sub DoMailMerge (FullName$, Position$)
  467.   vsPrinter1 = Format$(Now, "mmmm d, yyyy")
  468.   vsPrinter1 = ""
  469.   vsPrinter1 = "This letter is to inform that " & FullName & " has been promoted as " & Position & " of this company."
  470.   vsPrinter1 = ""
  471. End Sub
  472. Sub DoOrder ()
  473.   Dim fmt$, s$
  474.   vsPrinter1.FontSize = 24
  475.   vsPrinter1 = ""
  476.   vsPrinter1.FontBold = True
  477.   vsPrinter1.FontUnderline = True
  478.   vsPrinter1 = "VSView Order Form"
  479.   vsPrinter1.FontBold = False
  480.   vsPrinter1.FontUnderline = False
  481.   '---------------------------------------------------------------
  482.   vsPrinter1.PenWidth = 2
  483.   vsPrinter1.TableBorder = 5
  484.   vsPrinter1.FontSize = 11
  485.   vsPrinter1 = ""
  486.   vsPrinter1 = ""
  487.   vsPrinter1 = "Please rush my copy of VSView to the following address:"
  488.   vsPrinter1 = ""
  489.   fmt = "2500|>4000;"
  490.   s = fmt
  491.   s = s + "Name|;"
  492.   s = s + "Company|;"
  493.   s = s + "Address|;"
  494.   s = s + "|;"
  495.   s = s + "|;"
  496.   s = s + "|;"
  497.   s = s + "Phone|;"
  498.   s = s + "Fax|;"
  499.   s = s + "Credit Card #|;"
  500.   s = s + "Expiration Date|;"
  501.   s = s + "Comments|;"
  502.   s = s + "|;"
  503.   s = s + "|;"
  504.   vsPrinter1.Table = s
  505.   vsPrinter1 = ""
  506.   vsPrinter1 = ""
  507.   vsPrinter1 = "Fax your credit card order to 510-547-1084 or mail your check or money order to: VideoSoft, 2625 Alcatraz Avenue, Suite 271, Berkeley, California 94705.  Sorry no CODs."
  508.   vsPrinter1 = ""
  509.   vsPrinter1.TableBorder = 7
  510.   fmt = "4000|>2000|>2000;"
  511.   s = fmt
  512.   s = s + "Single Developer||US$99.00;"
  513.   s = s + "Additional Developers|___ x 99.00|;"
  514.   s = s + "Shipping and Handling Domestic|US$6.00|;"
  515.   s = s + "Shipping and Handling International|US$10.00|;"
  516.   s = s + "8.5% tax (CA residents only)||;"
  517.   s = s + "|TOTAL|;"
  518.   vsPrinter1.TextAlign = 1  'Center
  519.   vsPrinter1.Table = s
  520.   'Restore settings
  521.   vsPrinter1.TextAlign = 0  'Left
  522.   vsPrinter1.TableBorder = 7
  523.   vsPrinter1.FontSize = 40
  524.   vsPrinter1.PenWidth = 20
  525. End Sub
  526. Sub DoParagraph ()
  527.       Dim s$
  528.       s = "You can print whole paragraphs at once! This is very easy. "
  529.       
  530.       vsPrinter1 = s + s
  531.       vsPrinter1 = ""
  532.       vsPrinter1 = "VSPrinter takes care of indentation, wrapping, spacing, etc."
  533. End Sub
  534. Sub DoTable ()
  535.   Dim s$, fmt$
  536.   ' Print Title
  537.   vsPrinter1 = ""
  538.   vsPrinter1 = "Print by Table"
  539.   vsPrinter1.FontSize = 22
  540.   vsPrinter1 = ""
  541.   vsPrinter1 = "You can now print reports that includes paragraphs and tables.  With VSView, printing a grid it is very easy."
  542.   vsPrinter1 = ""
  543.   '---------------------------------------------------------------
  544.   'Set sizes and justification
  545.   fmt = "2500|>1600|^1600|>2100|>2200;"                   '^Center > Right
  546.   s = fmt + "Product|Code|Region|Units Sold|Revenue;"     'Set header
  547.   s = s + "Spam in a Can|00012|North|  372|$23,542;"
  548.   s = s + "Flipper Tuna|00231|North|  832|$44,432;"
  549.   s = s + "Jiffy Lubed Butter |00978|North|  452|$53,535;"
  550.   s = s + "Saturn Bars|00543|North|  654|$12,535;"
  551.   vsPrinter1.PenWidth = 8
  552.   vsPrinter1.TextAlign = 1  'Center
  553.   vsPrinter1.FontSize = 18
  554.   vsPrinter1.Table = s
  555.   vsPrinter1.TextAlign = 0        'Left
  556.   vsPrinter1 = ""
  557.   vsPrinter1 = "The table's cells could be aligned the way you want to."
  558.   'Restore Values
  559.   vsPrinter1.FontSize = 40
  560. End Sub
  561. Sub DoTitle ()
  562.   vsPrinter1.Action = 3 'Start Document
  563.   vsPrinter1.CurrentX = vsPrinter1.PageWidth / 2
  564.   vsPrinter1.CurrentY = vsPrinter1.PageHeight / 2
  565.   vsPrinter1.TextAlign = 1 'Center
  566.   vsPrinter1.TextColor = QBColor(2)
  567.   vsPrinter1.Paragraph = "VideoSoft VSPrinter"
  568.   vsPrinter1.TextColor = QBColor(0)
  569.   vsPrinter1.Paragraph = ""
  570.   vsPrinter1.Paragraph = "Click on any button"
  571.   vsPrinter1.TextAlign = 0 'Left
  572.   vsPrinter1.Action = 6 'End Document
  573. End Sub
  574. Sub Form_Load ()
  575.   OldOrientation = vsPrinter1.Orientation
  576.   MyPage = -1    'No pages selected
  577.   vsPrinter1.Preview = True
  578.   vsPrinter1.PreviewPage = 1
  579.   cmbZoom.AddItem "35"
  580.   cmbZoom.AddItem "50"
  581.   cmbZoom.AddItem "75"
  582.   cmbZoom.AddItem "100"
  583.   cmbZoom.AddItem "150"
  584.   cmbZoom.AddItem "200"
  585.   cmbZoom.ListIndex = 0
  586.   cmbOrientation.AddItem "Portrait"
  587.   cmbOrientation.AddItem "Landscape"
  588.   cmbOrientation.ListIndex = 0
  589.   MyPage = 0    'Default to first button
  590. End Sub
  591. Sub Form_Unload (Cancel As Integer)
  592.   'Restore priner orientation
  593.   vsPrinter1.Orientation = OldOrientation
  594. End Sub
  595. Sub VSPrinter1_NewTableCell (Row As Integer, Column As Integer, Cell As String)
  596.   'Change the TextColor of the first row when printing Table Example
  597.   If MyPage <> 2 Then Exit Sub
  598.   If Row = 1 Then
  599.     vsPrinter1.TextColor = QBColor(Column)
  600.   Else
  601.     vsPrinter1.TextColor = 1
  602.   End If
  603. End Sub
  604.