home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / bytech / test1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-27  |  42.0 KB  |  1,349 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "PrintWorks Demo"
  4.    ClientHeight    =   4545
  5.    ClientLeft      =   3375
  6.    ClientTop       =   1335
  7.    ClientWidth     =   4860
  8.    Height          =   4950
  9.    Left            =   3315
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4545
  12.    ScaleWidth      =   4860
  13.    Top             =   990
  14.    Width           =   4980
  15.    Begin CommandButton Command2 
  16.       Caption         =   "Print Only"
  17.       FontBold        =   -1  'True
  18.       FontItalic      =   0   'False
  19.       FontName        =   "System"
  20.       FontSize        =   9.75
  21.       FontStrikethru  =   0   'False
  22.       FontUnderline   =   0   'False
  23.       Height          =   495
  24.       Left            =   2520
  25.       TabIndex        =   1
  26.       Top             =   2520
  27.       Width           =   1815
  28.    End
  29.    Begin DMWIN DMWin8 
  30.       Aspect          =   1
  31.       BackColor       =   &H00C0C0C0&
  32.       BackGroundColor =   &H00000000&
  33.       Caption         =   "Print Only"
  34.       CurrentPoint    =   1
  35.       DeskColor       =   &H00408000&
  36.       DisplayPageNum  =   0
  37.       DocTitle        =   "Document Viewer"
  38.       EdgeColor       =   &H00000000&
  39.       EndAngle        =   360
  40.       FaceColor       =   &H00000000&
  41.       FieldData       =   ""
  42.       FieldID         =   ""
  43.       FieldNumber     =   1
  44.       FieldWidth      =   5
  45.       Filename        =   ""
  46.       FirstPrintPage  =   1
  47.       FormFile        =   ""
  48.       GetXTextPos     =   0
  49.       GetYTextPos     =   0
  50.       Height          =   495
  51.       HideButton      =   -1  'True
  52.       hMetaDC         =   0
  53.       Indent          =   0.5
  54.       Italic          =   0   'False
  55.       Justify         =   0
  56.       Landscape       =   0   'False
  57.       LastPrintPage   =   1
  58.       Left            =   2520
  59.       LineColor       =   &H00000000&
  60.       LineSpacing     =   0.16
  61.       LineWeight      =   0
  62.       LineWeightR     =   0
  63.       MetaFile        =   ""
  64.       MultiLine       =   -1  'True
  65.       NameFont        =   "Arial"
  66.       NumPoints       =   0
  67.       ObjHeight       =   0
  68.       ObjWidth        =   0
  69.       PageTitle       =   "Untitled"
  70.       PaperHeight     =   11
  71.       PaperWidth      =   8.5
  72.       Pattern         =   -1
  73.       PercentScreen   =   95
  74.       PictureScale    =   0
  75.       PrintAll        =   -1  'True
  76.       PrintCurrent    =   0   'False
  77.       PrintDialog     =   -1  'True
  78.       PrintEventOnly  =   -1  'True
  79.       PrintRange      =   0   'False
  80.       PrintText       =   ""
  81.       Radius          =   0
  82.       Resolution      =   300
  83.       Rotation        =   0
  84.       ShadowWidth     =   7
  85.       SizeFont        =   12
  86.       StartAngle      =   0
  87.       StartCloseUp    =   0   'False
  88.       StretchBitmap   =   0   'False
  89.       TemplateFile    =   ""
  90.       ThreeDAngle     =   45
  91.       ThreeDThickness =   0.2
  92.       Top             =   120
  93.       Underline       =   0   'False
  94.       WeightFont      =   3
  95.       Width           =   1815
  96.       X2              =   0
  97.       XPos            =   0
  98.       XPrintOffset    =   0
  99.       Y2              =   0
  100.       YPos            =   0
  101.       YPrintOffset    =   0
  102.    End
  103.    Begin DMWIN DMWin7 
  104.       Aspect          =   1
  105.       BackColor       =   &H00C0C0C0&
  106.       BackGroundColor =   &H00000000&
  107.       Caption         =   "Form & Data"
  108.       CurrentPoint    =   1
  109.       DeskColor       =   &H00008000&
  110.       DisplayPageNum  =   0
  111.       DocTitle        =   "Document Viewer"
  112.       EdgeColor       =   &H00000000&
  113.       EndAngle        =   360
  114.       FaceColor       =   &H00000000&
  115.       FieldData       =   ""
  116.       FieldID         =   ""
  117.       FieldNumber     =   1
  118.       FieldWidth      =   5
  119.       Filename        =   ""
  120.       FirstPrintPage  =   1
  121.       FormFile        =   ""
  122.       GetXTextPos     =   0
  123.       GetYTextPos     =   0
  124.       Height          =   495
  125.       HideButton      =   0   'False
  126.       hMetaDC         =   0
  127.       Indent          =   0.5
  128.       Italic          =   0   'False
  129.       Justify         =   0
  130.       Landscape       =   0   'False
  131.       LastPrintPage   =   1
  132.       Left            =   2520
  133.       LineColor       =   &H00000000&
  134.       LineSpacing     =   0.16
  135.       LineWeight      =   0
  136.       LineWeightR     =   0
  137.       MetaFile        =   ""
  138.       MultiLine       =   -1  'True
  139.       NameFont        =   "Arial"
  140.       NumPoints       =   0
  141.       ObjHeight       =   0
  142.       ObjWidth        =   0
  143.       PageTitle       =   "Untitled"
  144.       PaperHeight     =   11
  145.       PaperWidth      =   8.5
  146.       Pattern         =   -1
  147.       PercentScreen   =   95
  148.       PictureScale    =   0
  149.       PrintAll        =   -1  'True
  150.       PrintCurrent    =   0   'False
  151.       PrintDialog     =   -1  'True
  152.       PrintEventOnly  =   -1  'True
  153.       PrintRange      =   0   'False
  154.       PrintText       =   ""
  155.       Radius          =   0
  156.       Resolution      =   300
  157.       Rotation        =   0
  158.       ShadowWidth     =   7
  159.       SizeFont        =   12
  160.       StartAngle      =   0
  161.       StartCloseUp    =   0   'False
  162.       StretchBitmap   =   0   'False
  163.       TemplateFile    =   ""
  164.       ThreeDAngle     =   45
  165.       ThreeDThickness =   0.2
  166.       Top             =   1920
  167.       Underline       =   0   'False
  168.       WeightFont      =   3
  169.       Width           =   1815
  170.       X2              =   0
  171.       XPos            =   0
  172.       XPrintOffset    =   0
  173.       Y2              =   0
  174.       YPos            =   0
  175.       YPrintOffset    =   0
  176.    End
  177.    Begin DMWIN DMWin6 
  178.       Aspect          =   1
  179.       BackColor       =   &H00C0C0C0&
  180.       BackGroundColor =   &H00000000&
  181.       Caption         =   "Rotated Text"
  182.       CurrentPoint    =   1
  183.       DeskColor       =   &H00408000&
  184.       DisplayPageNum  =   0
  185.       DocTitle        =   "Document Viewer"
  186.       EdgeColor       =   &H00000000&
  187.       EndAngle        =   360
  188.       FaceColor       =   &H00000000&
  189.       FieldData       =   ""
  190.       FieldID         =   ""
  191.       FieldNumber     =   1
  192.       FieldWidth      =   5
  193.       Filename        =   ""
  194.       FirstPrintPage  =   1
  195.       FormFile        =   ""
  196.       GetXTextPos     =   0
  197.       GetYTextPos     =   0
  198.       Height          =   495
  199.       HideButton      =   0   'False
  200.       hMetaDC         =   0
  201.       Indent          =   0.5
  202.       Italic          =   0   'False
  203.       Justify         =   0
  204.       Landscape       =   0   'False
  205.       LastPrintPage   =   1
  206.       Left            =   2520
  207.       LineColor       =   &H00000000&
  208.       LineSpacing     =   0.16
  209.       LineWeight      =   0
  210.       LineWeightR     =   0
  211.       MetaFile        =   ""
  212.       MultiLine       =   -1  'True
  213.       NameFont        =   "Arial"
  214.       NumPoints       =   0
  215.       ObjHeight       =   0
  216.       ObjWidth        =   0
  217.       PageTitle       =   "Untitled"
  218.       PaperHeight     =   11
  219.       PaperWidth      =   8.5
  220.       Pattern         =   -1
  221.       PercentScreen   =   95
  222.       PictureScale    =   0
  223.       PrintAll        =   -1  'True
  224.       PrintCurrent    =   0   'False
  225.       PrintDialog     =   -1  'True
  226.       PrintEventOnly  =   -1  'True
  227.       PrintRange      =   0   'False
  228.       PrintText       =   ""
  229.       Radius          =   0
  230.       Resolution      =   300
  231.       Rotation        =   0
  232.       ShadowWidth     =   7
  233.       SizeFont        =   12
  234.       StartAngle      =   0
  235.       StartCloseUp    =   0   'False
  236.       StretchBitmap   =   0   'False
  237.       TemplateFile    =   ""
  238.       ThreeDAngle     =   45
  239.       ThreeDThickness =   0.2
  240.       Top             =   1320
  241.       Underline       =   0   'False
  242.       WeightFont      =   3
  243.       Width           =   1815
  244.       X2              =   0
  245.       XPos            =   0
  246.       XPrintOffset    =   0
  247.       Y2              =   0
  248.       YPos            =   0
  249.       YPrintOffset    =   0
  250.    End
  251.    Begin DMWIN DMWin5 
  252.       Aspect          =   1
  253.       BackColor       =   &H00C0C0C0&
  254.       BackGroundColor =   &H00000000&
  255.       Caption         =   "Fonts & Text"
  256.       CurrentPoint    =   1
  257.       DeskColor       =   &H00408000&
  258.       DisplayPageNum  =   0
  259.       DocTitle        =   "Document Viewer"
  260.       EdgeColor       =   &H00000000&
  261.       EndAngle        =   360
  262.       FaceColor       =   &H00000000&
  263.       FieldData       =   ""
  264.       FieldID         =   ""
  265.       FieldNumber     =   1
  266.       FieldWidth      =   5
  267.       Filename        =   ""
  268.       FirstPrintPage  =   1
  269.       FormFile        =   ""
  270.       GetXTextPos     =   0
  271.       GetYTextPos     =   0
  272.       Height          =   495
  273.       HideButton      =   0   'False
  274.       hMetaDC         =   0
  275.       Indent          =   0.5
  276.       Italic          =   0   'False
  277.       Justify         =   0
  278.       Landscape       =   0   'False
  279.       LastPrintPage   =   1
  280.       Left            =   2520
  281.       LineColor       =   &H00000000&
  282.       LineSpacing     =   0.16
  283.       LineWeight      =   0
  284.       LineWeightR     =   0
  285.       MetaFile        =   ""
  286.       MultiLine       =   -1  'True
  287.       NameFont        =   "Arial"
  288.       NumPoints       =   0
  289.       ObjHeight       =   0
  290.       ObjWidth        =   0
  291.       PageTitle       =   "Untitled"
  292.       PaperHeight     =   11
  293.       PaperWidth      =   8.5
  294.       Pattern         =   -1
  295.       PercentScreen   =   95
  296.       PictureScale    =   0
  297.       PrintAll        =   -1  'True
  298.       PrintCurrent    =   0   'False
  299.       PrintDialog     =   -1  'True
  300.       PrintEventOnly  =   -1  'True
  301.       PrintRange      =   0   'False
  302.       PrintText       =   ""
  303.       Radius          =   0
  304.       Resolution      =   300
  305.       Rotation        =   0
  306.       ShadowWidth     =   7
  307.       SizeFont        =   12
  308.       StartAngle      =   0
  309.       StartCloseUp    =   0   'False
  310.       StretchBitmap   =   0   'False
  311.       TemplateFile    =   ""
  312.       ThreeDAngle     =   45
  313.       ThreeDThickness =   0.2
  314.       Top             =   720
  315.       Underline       =   0   'False
  316.       WeightFont      =   3
  317.       Width           =   1815
  318.       X2              =   0
  319.       XPos            =   0
  320.       XPrintOffset    =   0
  321.       Y2              =   0
  322.       YPos            =   0
  323.       YPrintOffset    =   0
  324.    End
  325.    Begin DMWIN DMWin4 
  326.       Aspect          =   1
  327.       BackColor       =   &H00C0C0C0&
  328.       BackGroundColor =   &H00000000&
  329.       Caption         =   "Filled Objects"
  330.       CurrentPoint    =   1
  331.       DeskColor       =   &H00408000&
  332.       DisplayPageNum  =   0
  333.       DocTitle        =   "Document Viewer"
  334.       EdgeColor       =   &H00000000&
  335.       EndAngle        =   360
  336.       FaceColor       =   &H00000000&
  337.       FieldData       =   ""
  338.       FieldID         =   ""
  339.       FieldNumber     =   1
  340.       FieldWidth      =   5
  341.       Filename        =   ""
  342.       FirstPrintPage  =   1
  343.       FormFile        =   ""
  344.       GetXTextPos     =   0
  345.       GetYTextPos     =   0
  346.       Height          =   495
  347.       HideButton      =   0   'False
  348.       hMetaDC         =   0
  349.       Indent          =   0.5
  350.       Italic          =   0   'False
  351.       Justify         =   0
  352.       Landscape       =   0   'False
  353.       LastPrintPage   =   1
  354.       Left            =   480
  355.       LineColor       =   &H00000000&
  356.       LineSpacing     =   0.16
  357.       LineWeight      =   0
  358.       LineWeightR     =   0
  359.       MetaFile        =   ""
  360.       MultiLine       =   -1  'True
  361.       NameFont        =   "Arial"
  362.       NumPoints       =   0
  363.       ObjHeight       =   0
  364.       ObjWidth        =   0
  365.       PageTitle       =   "Untitled"
  366.       PaperHeight     =   11
  367.       PaperWidth      =   8.5
  368.       Pattern         =   -1
  369.       PercentScreen   =   95
  370.       PictureScale    =   0
  371.       PrintAll        =   -1  'True
  372.       PrintCurrent    =   0   'False
  373.       PrintDialog     =   -1  'True
  374.       PrintEventOnly  =   -1  'True
  375.       PrintRange      =   0   'False
  376.       PrintText       =   ""
  377.       Radius          =   0
  378.       Resolution      =   300
  379.       Rotation        =   0
  380.       ShadowWidth     =   7
  381.       SizeFont        =   12
  382.       StartAngle      =   0
  383.       StartCloseUp    =   0   'False
  384.       StretchBitmap   =   0   'False
  385.       TemplateFile    =   ""
  386.       ThreeDAngle     =   45
  387.       ThreeDThickness =   0.2
  388.       Top             =   1320
  389.       Underline       =   0   'False
  390.       WeightFont      =   3
  391.       Width           =   1815
  392.       X2              =   0
  393.       XPos            =   0
  394.       XPrintOffset    =   0
  395.       Y2              =   0
  396.       YPos            =   0
  397.       YPrintOffset    =   0
  398.    End
  399.    Begin DMWIN DMWin3 
  400.       Aspect          =   1
  401.       BackColor       =   &H00C0C0C0&
  402.       BackGroundColor =   &H00000000&
  403.       Caption         =   "Three-D Pie"
  404.       CurrentPoint    =   1
  405.       DeskColor       =   &H00408000&
  406.       DisplayPageNum  =   0
  407.       DocTitle        =   "Document Viewer"
  408.       EdgeColor       =   &H00000000&
  409.       EndAngle        =   360
  410.       FaceColor       =   &H00000000&
  411.       FieldData       =   ""
  412.       FieldID         =   ""
  413.       FieldNumber     =   1
  414.       FieldWidth      =   5
  415.       Filename        =   ""
  416.       FirstPrintPage  =   1
  417.       FormFile        =   ""
  418.       GetXTextPos     =   0
  419.       GetYTextPos     =   0
  420.       Height          =   495
  421.       HideButton      =   0   'False
  422.       hMetaDC         =   0
  423.       Indent          =   0.5
  424.       Italic          =   0   'False
  425.       Justify         =   0
  426.       Landscape       =   0   'False
  427.       LastPrintPage   =   1
  428.       Left            =   480
  429.       LineColor       =   &H00000000&
  430.       LineSpacing     =   0.16
  431.       LineWeight      =   0
  432.       LineWeightR     =   0
  433.       MetaFile        =   ""
  434.       MultiLine       =   -1  'True
  435.       NameFont        =   "Arial"
  436.       NumPoints       =   0
  437.       ObjHeight       =   0
  438.       ObjWidth        =   0
  439.       PageTitle       =   "Untitled"
  440.       PaperHeight     =   11
  441.       PaperWidth      =   8.5
  442.       Pattern         =   -1
  443.       PercentScreen   =   95
  444.       PictureScale    =   0
  445.       PrintAll        =   -1  'True
  446.       PrintCurrent    =   0   'False
  447.       PrintDialog     =   -1  'True
  448.       PrintEventOnly  =   -1  'True
  449.       PrintRange      =   0   'False
  450.       PrintText       =   ""
  451.       Radius          =   0
  452.       Resolution      =   300
  453.       Rotation        =   0
  454.       ShadowWidth     =   7
  455.       SizeFont        =   12
  456.       StartAngle      =   0
  457.       StartCloseUp    =   0   'False
  458.       StretchBitmap   =   0   'False
  459.       TemplateFile    =   ""
  460.       ThreeDAngle     =   45
  461.       ThreeDThickness =   0.2
  462.       Top             =   2520
  463.       Underline       =   0   'False
  464.       WeightFont      =   3
  465.       Width           =   1815
  466.       X2              =   0
  467.       XPos            =   0
  468.       XPrintOffset    =   0
  469.       Y2              =   0
  470.       YPos            =   0
  471.       YPrintOffset    =   0
  472.    End
  473.    Begin DMWIN DMWin2 
  474.       Aspect          =   1
  475.       BackColor       =   &H00C0C0C0&
  476.       BackGroundColor =   &H00000000&
  477.       Caption         =   "Three-D Bar"
  478.       CurrentPoint    =   1
  479.       DeskColor       =   &H00408000&
  480.       DisplayPageNum  =   0
  481.       DocTitle        =   "Document Viewer"
  482.       EdgeColor       =   &H00000000&
  483.       EndAngle        =   360
  484.       FaceColor       =   &H00000000&
  485.       FieldData       =   ""
  486.       FieldID         =   ""
  487.       FieldNumber     =   1
  488.       FieldWidth      =   5
  489.       Filename        =   ""
  490.       FirstPrintPage  =   1
  491.       FormFile        =   ""
  492.       GetXTextPos     =   0
  493.       GetYTextPos     =   0
  494.       Height          =   495
  495.       HideButton      =   0   'False
  496.       hMetaDC         =   0
  497.       Indent          =   0.5
  498.       Italic          =   0   'False
  499.       Justify         =   0
  500.       Landscape       =   0   'False
  501.       LastPrintPage   =   1
  502.       Left            =   480
  503.       LineColor       =   &H00000000&
  504.       LineSpacing     =   0.16
  505.       LineWeight      =   0
  506.       LineWeightR     =   0
  507.       MetaFile        =   ""
  508.       MultiLine       =   -1  'True
  509.       NameFont        =   "Arial"
  510.       NumPoints       =   0
  511.       ObjHeight       =   0
  512.       ObjWidth        =   0
  513.       PageTitle       =   "Untitled"
  514.       PaperHeight     =   11
  515.       PaperWidth      =   8.5
  516.       Pattern         =   -1
  517.       PercentScreen   =   95
  518.       PictureScale    =   0
  519.       PrintAll        =   -1  'True
  520.       PrintCurrent    =   0   'False
  521.       PrintDialog     =   -1  'True
  522.       PrintEventOnly  =   -1  'True
  523.       PrintRange      =   0   'False
  524.       PrintText       =   ""
  525.       Radius          =   0
  526.       Resolution      =   300
  527.       Rotation        =   0
  528.       ShadowWidth     =   7
  529.       SizeFont        =   12
  530.       StartAngle      =   0
  531.       StartCloseUp    =   0   'False
  532.       StretchBitmap   =   0   'False
  533.       TemplateFile    =   ""
  534.       ThreeDAngle     =   0
  535.       ThreeDThickness =   0.2
  536.       Top             =   1920
  537.       Underline       =   0   'False
  538.       WeightFont      =   3
  539.       Width           =   1815
  540.       X2              =   0
  541.       XPos            =   0
  542.       XPrintOffset    =   0
  543.       Y2              =   0
  544.       YPos            =   0
  545.       YPrintOffset    =   0
  546.    End
  547.    Begin DMWIN DMWin1 
  548.       Aspect          =   1
  549.       BackColor       =   &H00C0C0C0&
  550.       BackGroundColor =   &H00000000&
  551.       Caption         =   "Line Objects"
  552.       CurrentPoint    =   1
  553.       DeskColor       =   &H00408000&
  554.       DisplayPageNum  =   0
  555.       DocTitle        =   "Document Viewer"
  556.       EdgeColor       =   &H00000000&
  557.       EndAngle        =   360
  558.       FaceColor       =   &H00000000&
  559.       FieldData       =   ""
  560.       FieldID         =   ""
  561.       FieldNumber     =   1
  562.       FieldWidth      =   5
  563.       Filename        =   ""
  564.       FirstPrintPage  =   1
  565.       FormFile        =   ""
  566.       GetXTextPos     =   0
  567.       GetYTextPos     =   0
  568.       Height          =   495
  569.       HideButton      =   0   'False
  570.       hMetaDC         =   0
  571.       Indent          =   0.5
  572.       Italic          =   0   'False
  573.       Justify         =   0
  574.       Landscape       =   0   'False
  575.       LastPrintPage   =   1
  576.       Left            =   480
  577.       LineColor       =   &H00000000&
  578.       LineSpacing     =   0.16
  579.       LineWeight      =   0
  580.       LineWeightR     =   0
  581.       MetaFile        =   ""
  582.       MultiLine       =   -1  'True
  583.       NameFont        =   "Arial"
  584.       NumPoints       =   0
  585.       ObjHeight       =   0
  586.       ObjWidth        =   0
  587.       PageTitle       =   "Untitled"
  588.       PaperHeight     =   11
  589.       PaperWidth      =   8.5
  590.       Pattern         =   -1
  591.       PercentScreen   =   95
  592.       PictureScale    =   0
  593.       PrintAll        =   -1  'True
  594.       PrintCurrent    =   0   'False
  595.       PrintDialog     =   -1  'True
  596.       PrintEventOnly  =   -1  'True
  597.       PrintRange      =   0   'False
  598.       PrintText       =   ""
  599.       Radius          =   0
  600.       Resolution      =   300
  601.       Rotation        =   0
  602.       ShadowWidth     =   7
  603.       SizeFont        =   12
  604.       StartAngle      =   0
  605.       StartCloseUp    =   0   'False
  606.       StretchBitmap   =   0   'False
  607.       TemplateFile    =   ""
  608.       ThreeDAngle     =   0
  609.       ThreeDThickness =   0
  610.       Top             =   720
  611.       Underline       =   0   'False
  612.       WeightFont      =   3
  613.       Width           =   1815
  614.       X2              =   0
  615.       XPos            =   0
  616.       XPrintOffset    =   0
  617.       Y2              =   0
  618.       YPos            =   0
  619.       YPrintOffset    =   0
  620.    End
  621.    Begin CommandButton Command1 
  622.       Caption         =   "Quit"
  623.       Height          =   735
  624.       Left            =   480
  625.       TabIndex        =   0
  626.       Top             =   3240
  627.       Width           =   3855
  628.    End
  629. Declare Function MoveTo Lib "GDI" (ByVal hdc%, ByVal x%, ByVal y%) As Integer
  630. Declare Function LineTo Lib "GDI" (ByVal hdc%, ByVal x%, ByVal y%) As Integer
  631. Sub Command1_Click ()
  632.     End
  633. End Sub
  634. Sub Command2_Click ()
  635.         
  636. ' Create the document
  637.         DMWin8.DocTitle = "Print Only Demo"
  638.     DMWin8.CreateDocument = True
  639. ' Create the first page
  640.         DMWin8.PageTitle = "Page 1"
  641.         DMWin8.TemplateFile = "dmwin.tf"
  642.         DMWin8.PaperWidth = 8.5
  643.         DMWin8.PaperHeight = 11#
  644.         DMWin8.Resolution = 300
  645.     DMWin8.CreatePage = True
  646. ' Add a metafile
  647.         DMWin8.MetaFile = "dmwin.wmf"
  648.         DMWin8.XPos = .1
  649.         DMWin8.YPos = .1
  650.         DMWin8.ObjWidth = 1
  651.         DMWin8.ObjHeight = 1
  652.     DMWin8.MergeMetaFile = True
  653. ' Add the form
  654.         DMWin8.FormFile = "dmwin.wmf"
  655.     DMWin8.MergeForm = True
  656. ' Add the data
  657.     DMWin8.ClearFields = True
  658.         DMWin8.FieldNumber = 1
  659.         DMWin8.FieldData = "John R. Smith"
  660.     DMWin8.FillFieldNumber = True
  661.         DMWin8.FieldNumber = 2
  662.         DMWin8.FieldData = "21 Oriole Lane"
  663.     DMWin8.FillFieldNumber = True
  664.         DMWin8.FieldNumber = 3
  665.         DMWin8.FieldData = "White Plains, NY"
  666.     DMWin8.FillFieldNumber = True
  667. ' Create page 2
  668.         DMWin8.PageTitle = "Page 2"
  669.         DMWin8.TemplateFile = "dmwin.tf"
  670.         DMWin8.PaperWidth = 8.5
  671.         DMWin8.PaperHeight = 11#
  672.         DMWin8.Resolution = 300
  673.     DMWin8.CreatePage = True
  674. ' Add the form
  675.         DMWin8.FormFile = "dmwin.wmf"
  676.     DMWin8.MergeForm = True
  677. ' Add data
  678.     DMWin8.ClearFields = True
  679.         DMWin8.FieldID = "IDG_NAME"
  680.         DMWin8.FieldData = "Billy T. Kidd"
  681.     DMWin8.FillFieldID = True
  682.         DMWin8.FieldID = "IDG_ADDRESS1"
  683.         DMWin8.FieldData = "Boot Hill"
  684.     DMWin8.FillFieldID = True
  685.         DMWin8.FieldID = "IDG_ADDRESS2"
  686.         DMWin8.FieldData = "Dodge City, KS"
  687.     DMWin8.FillFieldID = True
  688. ' Choose one of five print options
  689.     PrintOption% = 5
  690.     If PrintOption% = 1 Then
  691.     ' Set up Option 1 - All Pages
  692.         DMWin8.PrintAll = True
  693.         DMWin8.PrintDialog = False
  694.     ElseIf PrintOption% = 2 Then
  695.     ' Set up Option 2 - Range of pages (the range is entire doc,
  696.     '                   since we only have 2 pages)
  697.         DMWin8.PrintAll = False
  698.         DMWin8.PrintDialog = False
  699.         DMWin8.FirstPrintPage = 1
  700.         DMWin8.LastPrintPage = 2
  701.     ElseIf PrintOption% = 3 Then
  702.     ' Set up Option 3 - First page only
  703.         DMWin8.PrintAll = False
  704.         DMWin8.PrintDialog = False
  705.         DMWin8.FirstPrintPage = 1
  706.         DMWin8.LastPrintPage = 1
  707.     ElseIf PrintOption% = 4 Then
  708.     ' Set up Option 4 - Last page only
  709.         DMWin8.PrintAll = False
  710.         DMWin8.PrintDialog = False
  711.         DMWin8.FirstPrintPage = 2
  712.         DMWin8.LastPrintPage = 2
  713.     ' Set up Option 5 - Use built in print dialog
  714.     ElseIf PrintOption% = 5 Then
  715.         DMWin8.PrintAll = False
  716.         DMWin8.PrintDialog = True
  717.         DMWin8.FirstPrintPage = 2
  718.         DMWin8.LastPrintPage = 2
  719.     End If
  720. ' Print the document
  721.     DMWin8.PrintDocument = True
  722. ' Delete the document - DON'T FORGET THIS STEP
  723.     DMWin8.DeleteDocument = True
  724. End Sub
  725. Sub DMWin1_ClickIn ()
  726. ' Create the document
  727.         DMWin1.DocTitle = "Line Objects Demo"
  728.     DMWin1.CreateDocument = True
  729. ' Create the page
  730.         DMWin1.PageTitle = "Page 1"
  731.         DMWin1.TemplateFile = ""
  732.         DMWin1.PaperWidth = 8.5
  733.         DMWin1.PaperHeight = 11#
  734.         DMWin1.Resolution = 300
  735.         DMWin1.Landscape = False
  736.     DMWin1.CreatePage = True
  737. ' Direct GDI API calls
  738.     success% = MoveTo(DMWin1.hMetaDC, 0, 0)
  739.     success% = LineTo(DMWin1.hMetaDC, 330, 230)
  740. ' Various line weights
  741.         DMWin1.LineColor = RGB(0, 0, 0)
  742.         DMWin1.XPos = .5
  743.         DMWin1.X2 = 2
  744.         y! = 1
  745.     For i% = 1 To 10
  746.             DMWin1.YPos = y!
  747.             DMWin1.Y2 = y!
  748.             DMWin1.LineWeight = i%
  749.         DMWin1.DrawLine = True
  750.         y! = y! + .1
  751.     Next i%
  752. ' Diagonal lines
  753.         DMWin1.LineColor = RGB(255, 0, 0)
  754.         DMWin1.LineWeight = 1
  755.         DMWin1.XPos = 3
  756.         DMWin1.YPos = 1
  757.         DMWin1.X2 = 4
  758.         DMWin1.Y2 = 2
  759.     DMWin1.DrawLine = True
  760.         DMWin1.XPos = 4
  761.         DMWin1.X2 = 3
  762.     DMWin1.DrawLine = True
  763. ' Rectangle
  764.         DMWin1.XPos = .25
  765.         DMWin1.YPos = .25
  766.         DMWin1.X2 = 8.25
  767.         DMWin1.Y2 = 10.75
  768.         DMWin1.LineColor = RGB(0, 0, 0)
  769.         DMWin1.LineWeight = 1
  770.     DMWin1.Rectangle = True
  771.         DMWin1.XPos = 5
  772.         DMWin1.YPos = .5
  773.         DMWin1.X2 = 7
  774.         DMWin1.Y2 = 2
  775.         DMWin1.LineColor = RGB(0, 0, 255)
  776.         DMWin1.LineWeightR = 12 / DMWin1.Resolution
  777.     DMWin1.Rectangle = True
  778.         DMWin1.XPos = 5 + .01
  779.         DMWin1.YPos = .5 + .01
  780.         DMWin1.X2 = 7 - .01
  781.         DMWin1.Y2 = 2 - .01
  782.         DMWin1.LineColor = RGB(255, 0, 255)
  783.         DMWin1.LineWeight = 3
  784.     DMWin1.Rectangle = True
  785. ' Circles with various aspects
  786.         DMWin1.LineColor = RGB(0, 0, 0)
  787.         DMWin1.XPos = 1.5
  788.         DMWin1.YPos = 4
  789.         DMWin1.Radius = 1
  790.         DMWin1.Aspect = 1
  791.         DMWin1.StartAngle = 0
  792.         DMWin1.EndAngle = 360
  793.         DMWin1.LineWeightR = 0
  794.     DMWin1.DrawCircle = True
  795.         DMWin1.XPos = 4
  796.         DMWin1.Aspect = 1.5
  797.     DMWin1.DrawCircle = True
  798.         DMWin1.XPos = 6.5
  799.         DMWin1.Aspect = .75
  800.     DMWin1.DrawCircle = True
  801. ' Arcs
  802.         DMWin1.XPos = 1.5
  803.         DMWin1.YPos = 7
  804.         DMWin1.Radius = 1
  805.         DMWin1.Aspect = 1
  806.         DMWin1.StartAngle = 30
  807.         DMWin1.EndAngle = 160
  808.         DMWin1.LineWeight = 3
  809.     DMWin1.DrawCircle = True
  810.         DMWin1.XPos = 4
  811.         DMWin1.StartAngle = 160
  812.         DMWin1.EndAngle = 30
  813.     DMWin1.DrawCircle = True
  814. ' Pie
  815.         DMWin1.XPos = 6.5
  816.         DMWin1.StartAngle = 210
  817.         DMWin1.EndAngle = 330
  818.     DMWin1.Pie = True
  819.     DMWin1.Preview = True
  820. End Sub
  821. Sub DMWin2_ClickIn ()
  822.         
  823. ' Create the document
  824.         DMWin2.DocTitle = "Three-D Bar Demo"
  825.         DMWin2.DeskColor = RGB(255, 255, 255)
  826.     DMWin2.CreateDocument = True
  827. ' Create the page
  828.         DMWin2.PageTitle = "Page 1"
  829.         DMWin2.TemplateFile = ""
  830.         DMWin2.PaperWidth = 8.5
  831.         DMWin2.PaperHeight = 11#
  832.         DMWin2.Resolution = 300
  833.     DMWin2.CreatePage = True
  834. ' Horizontal line for bitmap background demo
  835.         DMWin2.XPos = 0
  836.         DMWin2.YPos = .2
  837.         DMWin2.X2 = 5
  838.         DMWin2.Y2 = .2
  839.         DMWin2.LineColor = 0
  840.     DMWin2.DrawLine = True
  841. ' Add bitmap from disk - Opaque
  842.         DMWin2.Filename = "cat.bmp"
  843.         DMWin2.XPos = .5
  844.         DMWin2.YPos = .1
  845.         DMWin2.ObjWidth = .35
  846.         DMWin2.ObjHeight = .35
  847.         DMWin2.StretchBitmap = True
  848.         DMWin2.FaceColor = RGB(255, 255, 0)
  849.         DMWin2.BackGroundColor = RGB(255, 0, 255)
  850.         DMWin2.MakeOpaque = True
  851.     DMWin2.DrawBitmap = True
  852. ' Add bitmap from disk - Transparent
  853.         DMWin2.Filename = "cat.bmp"
  854.         DMWin2.XPos = 2.5
  855.         DMWin2.YPos = .1
  856.         DMWin2.ObjWidth = .35
  857.         DMWin2.ObjHeight = .35
  858.         DMWin2.StretchBitmap = True
  859.         DMWin2.FaceColor = RGB(255, 255, 0)
  860.         DMWin2.BackGroundColor = RGB(255, 0, 255)
  861.         DMWin2.MakeTransparent = True
  862.     DMWin2.DrawBitmap = True
  863. ' Three-D Bar with patterned face
  864.         DMWin2.FaceColor = RGB(0, 255, 255)
  865.         DMWin2.EdgeColor = RGB(0, 0, 255)
  866.         DMWin2.BackGroundColor = RGB(192, 192, 0)
  867.         DMWin2.ObjWidth = .4
  868.         DMWin2.ObjHeight = .85
  869.         DMWin2.XPos = .25
  870.         DMWin2.YPos = 1.5
  871.         DMWin2.Pattern = 3
  872.         DMWin2.ThreeDThickness = .1
  873.         DMWin2.ThreeDAngle = 45
  874.     DMWin2.ThreeDBar = True
  875. ' Three-D Bar with solid face
  876.         DMWin2.XPos = 1
  877.         DMWin2.Pattern = -1
  878.         DMWin2.ObjHeight = 1.25
  879.     DMWin2.ThreeDBar = True
  880. ' Stacked Three-D Bar
  881.         DMWin2.XPos = 1.75
  882.         DMWin2.ObjHeight = .7
  883.         DMWin2.FaceColor = RGB(0, 255, 255)
  884.         DMWin2.Pattern = -1
  885.     DMWin2.ThreeDBar = True
  886.         DMWin2.YPos = DMWin2.YPos - DMWin2.ObjHeight
  887.         DMWin2.ObjHeight = 1 - DMWin2.ObjHeight
  888.         DMWin2.FaceColor = RGB(0, 255, 0)
  889.         DMWin2.Pattern = -1
  890.     DMWin2.ThreeDBar = True
  891. ' Add bitmap from disk
  892.         DMWin2.Filename = "cat.bmp"
  893.         DMWin2.XPos = .1
  894.         DMWin2.YPos = .1
  895.         DMWin2.ObjWidth = .35
  896.         DMWin2.ObjHeight = .35
  897.         DMWin2.StretchBitmap = True
  898.         DMWin2.FaceColor = RGB(0, 0, 0)
  899.         DMWin2.BackGroundColor = RGB(255, 255, 255)
  900.     DMWin2.DrawBitmap = True
  901. ' Save Page to disk metafile
  902.         DMWin2.Filename = "saved.wmf"
  903.     DMWin2.SavePage = True
  904. ' Start preview close up
  905.     DMWin2.StartCloseUp = True
  906. ' Preview
  907.     DMWin2.Preview = True
  908. End Sub
  909. Sub DMWin3_ClickIn ()
  910. ' Create the document
  911.         DMWin3.DocTitle = "Three-D Pie Demo"
  912.     DMWin3.CreateDocument = True
  913. ' Create the page
  914.         DMWin3.PageTitle = "Page 1"
  915.         DMWin3.TemplateFile = ""
  916.         DMWin3.PaperWidth = 8.5
  917.         DMWin3.PaperHeight = 11#
  918.         DMWin3.Resolution = 300
  919.     DMWin3.CreatePage = True
  920. ' Three-D pie with patterned face
  921.         DMWin3.Pattern = 2
  922.         DMWin3.XPos = 5
  923.         DMWin3.YPos = 3
  924.         DMWin3.Radius = 1.5
  925.         DMWin3.Aspect = 1.2
  926.         DMWin3.StartAngle = 30
  927.         DMWin3.EndAngle = 120
  928.         DMWin3.ThreeDThickness = 1
  929.         DMWin3.FaceColor = RGB(0, 128, 128)
  930.         DMWin3.EdgeColor = RGB(0, 0, 255)
  931.     DMWin3.ThreeDPie = True
  932. ' Three-D pie with solid face
  933.         DMWin3.Pattern = -1
  934.         DMWin3.XPos = 2
  935.         DMWin3.YPos = 3
  936.     DMWin3.ThreeDPie = True
  937. ' Three-D Pie Chart
  938.         DMWin3.YPos = 7
  939.         DMWin3.XPos = 4.5
  940.         DMWin3.Aspect = .75
  941.         DMWin3.StartAngle = 60
  942.         DMWin3.EndAngle = 120
  943.         DMWin3.Pattern = -1
  944.         DMWin3.EdgeColor = RGB(0, 0, 255)
  945.         DMWin3.FaceColor = RGB(255, 255, 0)
  946.         DMWin3.ThreeDThickness = .4
  947.     DMWin3.ThreeDPie = True
  948.         DMWin3.StartAngle = 120
  949.         DMWin3.EndAngle = 240
  950.         DMWin3.FaceColor = RGB(255, 0, 255)
  951.     DMWin3.ThreeDPie = True
  952.         DMWin3.StartAngle = 340
  953.         DMWin3.EndAngle = 60
  954.         DMWin3.FaceColor = RGB(255, 0, 0)
  955.     DMWin3.ThreeDPie = True
  956.         DMWin3.YPos = 7.275
  957.         DMWin3.XPos = 4.675
  958.         DMWin3.StartAngle = 240
  959.         DMWin3.EndAngle = 340
  960.         DMWin3.FaceColor = RGB(0, 255, 255)
  961.     DMWin3.ThreeDPie = True
  962.     DMWin3.Preview = True
  963. End Sub
  964. Sub DMWin4_ClickIn ()
  965. ' Create Document
  966.         DMWin4.DocTitle = "Filled Objects Demo"
  967.         DMWin4.DeskColor = RGB(192, 192, 192)
  968.     DMWin4.CreateDocument = True
  969. ' Create Page
  970.         DMWin4.PageTitle = "Page 1"
  971.         DMWin4.TemplateFile = ""
  972.         DMWin4.PaperWidth = 8.5
  973.         DMWin4.PaperHeight = 11#
  974.         DMWin4.Resolution = 300
  975.     DMWin4.CreatePage = True
  976. ' Filled Rectangle with solid face
  977.         DMWin4.LineWeight = 5
  978.         DMWin4.XPos = 1
  979.         DMWin4.YPos = 1
  980.         DMWin4.X2 = 3
  981.         DMWin4.Y2 = 3
  982.         DMWin4.FaceColor = RGB(255, 255, 0)
  983.         DMWin4.EdgeColor = RGB(0, 255, 0)
  984.         DMWin4.BackGroundColor = RGB(0, 255, 0)
  985.         DMWin4.Pattern = -1
  986.     DMWin4.FillRectangle = True
  987. ' Filled Rectangle with patterned face
  988.         DMWin4.LineWeight = 5
  989.         DMWin4.XPos = 4
  990.         DMWin4.YPos = 1
  991.         DMWin4.X2 = 6
  992.         DMWin4.Y2 = 3
  993.         DMWin4.FaceColor = RGB(255, 255, 0)
  994.         DMWin4.EdgeColor = RGB(0, 255, 0)
  995.         DMWin4.BackGroundColor = RGB(0, 255, 0)
  996.         DMWin4.Pattern = 5
  997.     DMWin4.FillRectangle = True
  998. ' Filled Polygon with solid face
  999.     ReDim x!(4), y!(4)
  1000.         x!(1) = 1: y!(1) = 4
  1001.         x!(2) = 3: y!(2) = 4.5
  1002.         x!(3) = 1.5: y!(3) = 5.5
  1003.         x!(4) = .75: y!(4) = 4.3
  1004.     For i% = 1 To 4
  1005.         DMWin4.XPos = x!(i%)
  1006.         DMWin4.YPos = y!(i%)
  1007.         DMWin4.CurrentPoint = i%
  1008.         DMWin4.SetPoint = True
  1009.     Next i%
  1010.         DMWin4.NumPoints = 4
  1011.         DMWin4.Pattern = -1
  1012.     DMWin4.FillPolygon = True
  1013. ' Filled Polygon with patterned face
  1014.     For i% = 1 To 4
  1015.         DMWin4.XPos = x!(i%) + 3
  1016.         DMWin4.YPos = y!(i%)
  1017.         DMWin4.CurrentPoint = i%
  1018.         DMWin4.SetPoint = True
  1019.     Next i%
  1020.         DMWin4.NumPoints = 4
  1021.         DMWin4.Pattern = 0
  1022.     DMWin4.FillPolygon = True
  1023. ' Filled Pie with solid face
  1024.         DMWin4.LineWeight = 3
  1025.         DMWin4.XPos = 2
  1026.         DMWin4.YPos = 7
  1027.         DMWin4.Radius = 1.5
  1028.         DMWin4.Aspect = .75
  1029.         DMWin4.StartAngle = 300
  1030.         DMWin4.EndAngle = 240
  1031.         DMWin4.Pattern = -1
  1032.         DMWin4.FaceColor = RGB(255, 255, 0)
  1033.         DMWin4.EdgeColor = RGB(0, 0, 0)
  1034.     DMWin4.FillCircle = True
  1035. ' Filled Pie with opaque patterned face
  1036.         DMWin4.XPos = 3
  1037.         DMWin4.Pattern = 5
  1038.         DMWin4.MakeOpaque = True
  1039.     DMWin4.FillCircle = True
  1040. ' Filled Pie with transparent patterned face
  1041.         DMWin4.XPos = 4
  1042.         DMWin4.Pattern = 5
  1043.         DMWin4.MakeTransparent = True
  1044.     DMWin4.FillCircle = True
  1045. ' Preview
  1046.         DMWin4.DeskColor = RGB(192, 192, 192)
  1047.     DMWin4.Preview = True
  1048. End Sub
  1049. Sub DMWin5_ClickIn ()
  1050. ' Create the document
  1051.         DMWin5.DocTitle = "Fonts & Text Demo"
  1052.     DMWin5.CreateDocument = True
  1053. ' Create the page
  1054.         DMWin5.PageTitle = "Page 1"
  1055.         DMWin5.TemplateFile = ""
  1056.         DMWin5.PaperWidth = 8.5
  1057.         DMWin5.PaperHeight = 11#
  1058.         DMWin5.Resolution = 300
  1059.     DMWin5.CreatePage = True
  1060. ' Select a font
  1061.         DMWin5.NameFont = "Arial"
  1062.         DMWin5.SizeFont = 18#
  1063.         DMWin5.WeightFont = 5        ' medium
  1064.         DMWin5.Italic = False
  1065.         DMWin5.Underline = False
  1066.         DMWin5.Rotation = 0          ' portrait
  1067.         'DMWin5.Rotation = 90         ' landscape
  1068.         'DMWin5.Rotation = 180        ' reverse portrait
  1069.         'DMWin5.Rotation = 270        ' reverse landscape
  1070.     DMWin5.SelectFont = True
  1071. ' Print some text - left justified
  1072.         DMWin5.XPos = 1
  1073.         DMWin5.YPos = 1.5
  1074.         DMWin5.PrintText = "This is left justified."
  1075.         DMWin5.FieldWidth = 5
  1076.         DMWin5.Indent = 0
  1077.         DMWin5.LineSpacing = 1 / 4
  1078.         DMWin5.Justify = 0
  1079.         DMWin5.MultiLine = False
  1080.     DMWin5.Paragraph = True
  1081. ' Print some text - centered
  1082.         DMWin5.LineColor = RGB(255, 0, 0)
  1083.         DMWin5.YPos = 2
  1084.         DMWin5.PrintText = "This is centered."
  1085.         DMWin5.Justify = 1
  1086.     DMWin5.Paragraph = True
  1087. ' Print some text - right justified
  1088.         DMWin5.LineColor = RGB(0, 0, 255)
  1089.         DMWin5.YPos = 2.5
  1090.         DMWin5.PrintText = "This is right justified"
  1091.         DMWin5.Justify = 2
  1092.     DMWin5.Paragraph = True
  1093. ' Print some text - fully justified
  1094.         DMWin5.LineColor = RGB(0, 0, 0)
  1095.         DMWin5.Indent = .4
  1096.         DMWin5.YPos = 3
  1097.         DMWin5.PrintText = "This is some fully justified text with word wrap and indentation."
  1098.         DMWin5.Justify = 3
  1099.         DMWin4.MultiLine = True
  1100.     DMWin5.Paragraph = True
  1101. ' Print some text - decimal aligned
  1102.         DMWin5.LineColor = RGB(0, 0, 0)
  1103.         DMWin5.Indent = 0
  1104.         DMWin5.XPos = 3
  1105.         DMWin5.Justify = 4
  1106.         DMWin5.YPos = 4
  1107.         DMWin5.PrintText = "$ 1,000.00  <- Decimal aligned"
  1108.     DMWin5.Paragraph = True
  1109.         DMWin5.YPos = 4.25
  1110.         DMWin5.PrintText = "59.99"
  1111.     DMWin5.Paragraph = True
  1112.         DMWin5.YPos = 4.5
  1113.         DMWin5.PrintText = "12,032.45"
  1114.     DMWin5.Paragraph = True
  1115.         DMWin5.YPos = 4.75
  1116.         DMWin5.PrintText = "750.00"
  1117.     DMWin5.Paragraph = True
  1118.         DMWin5.WeightFont = 7
  1119.     DMWin5.SelectFont = True
  1120.         DMWin5.Justify = 4
  1121.         DMWin5.YPos = 5.15
  1122.         DMWin5.PrintText = "Total: $  13,842.44"
  1123.     DMWin5.Paragraph = True
  1124. ' Draw some guide lines (box)
  1125.     If DMWin5.Rotation = 0 Then
  1126.         DMWin5.XPos = 1
  1127.         DMWin5.YPos = 1
  1128.         DMWin5.X2 = 6
  1129.         DMWin5.Y2 = 6
  1130.     ElseIf DMWin5.Rotation = 90 Then
  1131.         DMWin5.XPos = 1
  1132.         DMWin5.YPos = 5
  1133.         DMWin5.X2 = 6
  1134.         DMWin5.Y2 = 10
  1135.     ElseIf DMWin5.Rotation = 180 Then
  1136.         DMWin5.XPos = 2.5
  1137.         DMWin5.YPos = 5
  1138.         DMWin5.X2 = 7.5
  1139.         DMWin5.Y2 = 10
  1140.     ElseIf DMWin5.Rotation = 270 Then
  1141.         DMWin5.XPos = 2.5
  1142.         DMWin5.YPos = 1
  1143.         DMWin5.X2 = 7.5
  1144.         DMWin5.Y2 = 6
  1145.     End If
  1146.         DMWin5.LineWeight = 1
  1147.         DMWin5.LineColor = 0
  1148.     DMWin5.Rectangle = True
  1149.         
  1150.         DMWin5.XPrintOffset = .25
  1151.         DMWin5.YPrintOffset = .25
  1152.     DMWin5.Preview = True
  1153. End Sub
  1154. Sub DMWin6_ClickIn ()
  1155. ' Create the document
  1156.         DMWin6.DocTitle = "Rotated Text Demo"
  1157.     DMWin6.CreateDocument = True
  1158. ' Create the page
  1159.         DMWin6.PageTitle = "Page 1"
  1160.         DMWin6.TemplateFile = ""
  1161.         DMWin6.PaperWidth = 8.5
  1162.         DMWin6.PaperHeight = 11#
  1163.         DMWin6.Resolution = 300
  1164.     DMWin6.CreatePage = True
  1165. ' Set text properties
  1166.     DMWin6.XPos = 4.25
  1167.     DMWin6.YPos = 5.5
  1168.     DMWin6.PrintText = "       Rotated Text"
  1169.     DMWin6.FieldWidth = 5
  1170.     DMWin6.Indent = 0
  1171.     DMWin6.MultiLine = False
  1172.     DMWin6.LineSpacing = 1 / 4
  1173.     DMWin6.Justify = 0
  1174. ' Display circle of text objects
  1175.     For i% = 5 To 355 Step 20
  1176.     ' Select rotated font
  1177.             DMWin6.NameFont = "Arial"
  1178.             DMWin6.SizeFont = 36#
  1179.             DMWin6.WeightFont = 7        ' bold
  1180.             DMWin6.Italic = False
  1181.             DMWin6.Underline = False
  1182.             DMWin6.Rotation = i%          ' portrait
  1183.         DMWin6.SelectFont = True
  1184.     ' Print text
  1185.         DMWin6.Paragraph = True
  1186.     Next i%
  1187. ' Preview
  1188.         DMWin6.PrintEventOnly = True
  1189.     DMWin6.Preview = True
  1190. End Sub
  1191. Sub DMWin6_PreviewClosing ()
  1192.     MsgBox "Preview Closing."
  1193. End Sub
  1194. Sub DMWin6_PrintEvent ()
  1195.     MsgBox "Print Event Fired."
  1196. End Sub
  1197. Sub DMWin7_ClickIn ()
  1198.         
  1199. ' Create the document
  1200.         DMWin7.DocTitle = "Multiple Page Form & Data Demo"
  1201.     DMWin7.CreateDocument = True
  1202. ' Create the first page
  1203.         DMWin7.PageTitle = "Page 1"
  1204.         DMWin7.TemplateFile = "dmwin.tf"
  1205.         DMWin7.PaperWidth = 8.5
  1206.         DMWin7.PaperHeight = 11#
  1207.         DMWin7.Landscape = False
  1208.         DMWin7.Resolution = 300
  1209.     DMWin7.CreatePage = True
  1210. ' Add some text and graphics
  1211. ' Select a font
  1212.         DMWin7.NameFont = "Arial"
  1213.         DMWin7.SizeFont = 18#
  1214.         DMWin7.WeightFont = 5        ' medium
  1215.         DMWin7.Italic = False
  1216.         DMWin7.Underline = False
  1217.         DMWin7.Rotation = 0          ' portrait
  1218.     DMWin7.SelectFont = True
  1219. ' Print some text - left justified
  1220.         DMWin7.XPos = 1
  1221.         DMWin7.YPos = 5.5
  1222.         DMWin7.PrintText = "Sample text"
  1223.         DMWin7.FieldWidth = 5
  1224.         DMWin7.Indent = 0
  1225.         DMWin7.LineSpacing = 1 / 4
  1226.         DMWin7.Justify = 0
  1227.         DMWin7.MultiLine = False
  1228.     DMWin7.Paragraph = True
  1229. ' Draw a cross hairs
  1230.         DMWin7.XPos = 1
  1231.         DMWin7.YPos = 5
  1232.         DMWin7.X2 = 1
  1233.         DMWin7.Y2 = 6
  1234.     DMWin7.DrawLine = True
  1235.         DMWin7.XPos = .5
  1236.         DMWin7.YPos = 5.5
  1237.         DMWin7.X2 = 1.5
  1238.         DMWin7.Y2 = 5.5
  1239.     DMWin7.DrawLine = True
  1240. ' Add a metafile
  1241.         DMWin7.MetaFile = "bird.wmf"
  1242.         DMWin7.XPos = .5
  1243.         DMWin7.YPos = 2.5
  1244.         DMWin7.ObjWidth = 1
  1245.         DMWin7.ObjHeight = .85
  1246.     DMWin7.MergeMetaFile = True
  1247. ' Add a form
  1248.         DMWin7.FormFile = "dmwin.wmf"
  1249.     DMWin7.MergeForm = True
  1250. ' Add the data
  1251.     DMWin7.ClearFields = True
  1252.         DMWin7.FieldNumber = 1
  1253.         DMWin7.FieldData = "John R. Smith"
  1254.     DMWin7.FillFieldNumber = True
  1255.         DMWin7.FieldNumber = 2
  1256.         DMWin7.FieldData = "21 Oriole Lane"
  1257.     DMWin7.FillFieldNumber = True
  1258.         DMWin7.FieldNumber = 3
  1259.         DMWin7.FieldData = "White Plains, NY"
  1260.     DMWin7.FillFieldNumber = True
  1261. ' Create the second page using Metric Units
  1262.         DMWin7.PageTitle = "Page 2 - Metric Units"
  1263.         DMWin7.TemplateFile = "dmwinmet.tf"
  1264.         DMWin7.PaperWidth = 21.59
  1265.         DMWin7.PaperHeight = 27.94
  1266.         DMWin7.Landscape = False
  1267.         DMWin7.Resolution = 118.11
  1268.     DMWin7.CreatePage = True
  1269. ' Add some text and graphics
  1270. ' Select a font
  1271.         DMWin7.NameFont = "Arial"
  1272.         DMWin7.SizeFont = 18# * 2.54
  1273.         DMWin7.WeightFont = 5        ' medium
  1274.         DMWin7.Italic = False
  1275.         DMWin7.Underline = False
  1276.         DMWin7.Rotation = 0          ' portrait
  1277.     DMWin7.SelectFont = True
  1278. ' Print some text - left justified
  1279.         DMWin7.XPos = 1 * 2.54
  1280.         DMWin7.YPos = 5.5 * 2.54
  1281.         DMWin7.PrintText = "Sample text"
  1282.         DMWin7.FieldWidth = 5 * 2.54
  1283.         DMWin7.Indent = 0
  1284.         DMWin7.LineSpacing = 1 * 2.54 / 4
  1285.         DMWin7.Justify = 0
  1286.         DMWin7.MultiLine = False
  1287.     DMWin7.Paragraph = True
  1288. ' Draw a cross hairs
  1289.         DMWin7.XPos = 1 * 2.54
  1290.         DMWin7.YPos = 5 * 2.54
  1291.         DMWin7.X2 = 1 * 2.54
  1292.         DMWin7.Y2 = 6 * 2.54
  1293.     DMWin7.DrawLine = True
  1294.         DMWin7.XPos = .5 * 2.54
  1295.         DMWin7.YPos = 5.5 * 2.54
  1296.         DMWin7.X2 = 1.5 * 2.54
  1297.         DMWin7.Y2 = 5.5 * 2.54
  1298.     DMWin7.DrawLine = True
  1299. ' Add a form
  1300.         DMWin7.FormFile = "dmwinmet.wmf"
  1301.     DMWin7.MergeForm = True
  1302. ' Add a metafile
  1303.         DMWin7.MetaFile = "bird.wmf"
  1304.         DMWin7.XPos = 1.27
  1305.         DMWin7.YPos = 6.35
  1306.         DMWin7.ObjWidth = 2.54
  1307.         DMWin7.ObjHeight = 2.16
  1308.     DMWin7.MergeMetaFile = True
  1309. ' Add the data
  1310.     DMWin7.ClearFields = True
  1311.         DMWin7.FieldID = "IDG_NAME"
  1312.         DMWin7.FieldData = "Billy T. Kidd"
  1313.     DMWin7.FillFieldID = True
  1314.         DMWin7.FieldID = "IDG_ADDRESS1"
  1315.         DMWin7.FieldData = "Boot Hill"
  1316.     DMWin7.FillFieldID = True
  1317.         DMWin7.FieldID = "IDG_ADDRESS2"
  1318.         DMWin7.FieldData = "Dodge City, KS"
  1319.     DMWin7.FillFieldID = True
  1320. ' Create the third page - landscape orientation
  1321.         DMWin7.PageTitle = "Page 3 - Landscape Orientation"
  1322.         DMWin7.TemplateFile = ""
  1323.         DMWin7.PaperWidth = 11#
  1324.         DMWin7.PaperHeight = 8.5
  1325.         DMWin7.Landscape = True
  1326.         DMWin7.Resolution = 300
  1327.     DMWin7.CreatePage = True
  1328. ' Select a font
  1329.         DMWin7.NameFont = "Arial"
  1330.         DMWin7.SizeFont = 18#
  1331.         DMWin7.WeightFont = 5        ' medium
  1332.         DMWin7.Italic = False
  1333.         DMWin7.Underline = False
  1334.         DMWin7.Rotation = 0          ' portrait
  1335.     DMWin7.SelectFont = True
  1336. ' Print some text - left justified
  1337.         DMWin7.XPos = 1
  1338.         DMWin7.YPos = 1.5
  1339.         DMWin7.PrintText = "Sample landscape text."
  1340.         DMWin7.FieldWidth = 5
  1341.         DMWin7.Indent = 0
  1342.         DMWin7.LineSpacing = 1 / 4
  1343.         DMWin7.Justify = 0
  1344.         DMWin7.MultiLine = False
  1345.     DMWin7.Paragraph = True
  1346. ' Preview it
  1347.     DMWin7.Preview = True
  1348. End Sub
  1349.