home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / bytech / test2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-23  |  8.1 KB  |  269 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Custom Preview Demo"
  4.    ClientHeight    =   7410
  5.    ClientLeft      =   1470
  6.    ClientTop       =   1410
  7.    ClientWidth     =   6660
  8.    Height          =   7815
  9.    Left            =   1410
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   7410
  12.    ScaleWidth      =   6660
  13.    Top             =   1065
  14.    Width           =   6780
  15.    Begin DMWIN DMWin3 
  16.       Aspect          =   1
  17.       BackColor       =   &H00C0C0C0&
  18.       BackGroundColor =   &H00000000&
  19.       Caption         =   "DMWin3"
  20.       CurrentPoint    =   1
  21.       DeskColor       =   &H00408000&
  22.       DisplayPageNum  =   1
  23.       DocTitle        =   "Document Viewer"
  24.       EdgeColor       =   &H00000000&
  25.       EndAngle        =   360
  26.       FaceColor       =   &H00000000&
  27.       FieldData       =   ""
  28.       FieldID         =   ""
  29.       FieldNumber     =   1
  30.       FieldWidth      =   5
  31.       Filename        =   ""
  32.       FirstPrintPage  =   1
  33.       FormFile        =   ""
  34.       GetXTextPos     =   0
  35.       GetYTextPos     =   0
  36.       Height          =   1455
  37.       HideButton      =   0   'False
  38.       hMetaDC         =   0
  39.       Indent          =   0.5
  40.       Italic          =   0   'False
  41.       Justify         =   0
  42.       Landscape       =   0   'False
  43.       LastPrintPage   =   1
  44.       Left            =   120
  45.       LineColor       =   &H00000000&
  46.       LineSpacing     =   0.16
  47.       LineWeight      =   0
  48.       LineWeightR     =   0
  49.       MetaFile        =   ""
  50.       MultiLine       =   -1  'True
  51.       NameFont        =   "Arial"
  52.       NumPoints       =   0
  53.       ObjHeight       =   0
  54.       ObjWidth        =   0
  55.       PageTitle       =   "Untitled"
  56.       PaperHeight     =   11
  57.       PaperWidth      =   8.5
  58.       Pattern         =   -1
  59.       PercentScreen   =   95
  60.       PictureScale    =   0
  61.       PrintAll        =   -1  'True
  62.       PrintCurrent    =   0   'False
  63.       PrintDialog     =   -1  'True
  64.       PrintEventOnly  =   -1  'True
  65.       PrintRange      =   0   'False
  66.       PrintText       =   ""
  67.       Radius          =   0
  68.       Resolution      =   300
  69.       Rotation        =   0
  70.       ShadowWidth     =   7
  71.       SizeFont        =   12
  72.       StartAngle      =   0
  73.       StartCloseUp    =   0   'False
  74.       StretchBitmap   =   0   'False
  75.       TemplateFile    =   ""
  76.       ThreeDAngle     =   45
  77.       ThreeDThickness =   0.2
  78.       Top             =   120
  79.       Underline       =   0   'False
  80.       WeightFont      =   3
  81.       Width           =   975
  82.       X2              =   0
  83.       XPos            =   0
  84.       XPrintOffset    =   0
  85.       Y2              =   0
  86.       YPos            =   0
  87.       YPrintOffset    =   0
  88.    End
  89.    Begin CommandButton Command4 
  90.       Caption         =   "Zoom Out"
  91.       Height          =   375
  92.       Left            =   3360
  93.       TabIndex        =   3
  94.       Top             =   6720
  95.       Width           =   1215
  96.    End
  97.    Begin CommandButton Command3 
  98.       Caption         =   "Zoom In"
  99.       Height          =   375
  100.       Left            =   2160
  101.       TabIndex        =   2
  102.       Top             =   6720
  103.       Width           =   1215
  104.    End
  105.    Begin DMWIN DMWin1 
  106.       Aspect          =   1
  107.       BackColor       =   &H00C0C0C0&
  108.       BackGroundColor =   &H00000000&
  109.       Caption         =   "DMWin1"
  110.       CurrentPoint    =   1
  111.       DeskColor       =   &H00408000&
  112.       DisplayPageNum  =   1
  113.       DocTitle        =   "Document Viewer"
  114.       EdgeColor       =   &H00000000&
  115.       EndAngle        =   360
  116.       FaceColor       =   &H00000000&
  117.       FieldData       =   ""
  118.       FieldID         =   ""
  119.       FieldNumber     =   1
  120.       FieldWidth      =   5
  121.       Filename        =   ""
  122.       FirstPrintPage  =   1
  123.       FormFile        =   ""
  124.       GetXTextPos     =   0
  125.       GetYTextPos     =   0
  126.       Height          =   6495
  127.       HideButton      =   0   'False
  128.       hMetaDC         =   0
  129.       Indent          =   0.5
  130.       Italic          =   0   'False
  131.       Justify         =   0
  132.       Landscape       =   0   'False
  133.       LastPrintPage   =   1
  134.       Left            =   960
  135.       LineColor       =   &H00000000&
  136.       LineSpacing     =   0.16
  137.       LineWeight      =   0
  138.       LineWeightR     =   0
  139.       MetaFile        =   ""
  140.       MultiLine       =   -1  'True
  141.       NameFont        =   "Arial"
  142.       NumPoints       =   0
  143.       ObjHeight       =   0
  144.       ObjWidth        =   0
  145.       PageTitle       =   "Untitled"
  146.       PaperHeight     =   11
  147.       PaperWidth      =   8.5
  148.       Pattern         =   -1
  149.       PercentScreen   =   95
  150.       PictureScale    =   0
  151.       PrintAll        =   -1  'True
  152.       PrintCurrent    =   0   'False
  153.       PrintDialog     =   -1  'True
  154.       PrintEventOnly  =   -1  'True
  155.       PrintRange      =   0   'False
  156.       PrintText       =   ""
  157.       Radius          =   0
  158.       Resolution      =   300
  159.       Rotation        =   0
  160.       ShadowWidth     =   7
  161.       SizeFont        =   12
  162.       StartAngle      =   0
  163.       StartCloseUp    =   0   'False
  164.       StretchBitmap   =   0   'False
  165.       TemplateFile    =   ""
  166.       ThreeDAngle     =   45
  167.       ThreeDThickness =   0.2
  168.       Top             =   240
  169.       Underline       =   0   'False
  170.       WeightFont      =   3
  171.       Width           =   4815
  172.       X2              =   0
  173.       XPos            =   0
  174.       XPrintOffset    =   0
  175.       Y2              =   0
  176.       YPos            =   0
  177.       YPrintOffset    =   0
  178.    End
  179.    Begin CommandButton Command1 
  180.       Caption         =   "Print"
  181.       Height          =   375
  182.       Left            =   4560
  183.       TabIndex        =   1
  184.       Top             =   6720
  185.       Width           =   1215
  186.    End
  187.    Begin CommandButton Command2 
  188.       Caption         =   "Quit"
  189.       Height          =   375
  190.       Left            =   960
  191.       TabIndex        =   0
  192.       Top             =   6720
  193.       Width           =   1215
  194.    End
  195. Sub Command1_Click ()
  196.     DMWin1.PrintDocument = True
  197. End Sub
  198. Sub Command2_Click ()
  199.     DMWin3.DeleteDocument = True
  200.     End
  201. End Sub
  202. Sub Command3_Click ()
  203.     DMWin1.PictureScale = DMWin1.PictureScale * 2
  204. End Sub
  205. Sub Command4_Click ()
  206.     DMWin1.PictureScale = DMWin1.PictureScale / 2
  207.     If DMWin1.PictureScale < 1 Then DMWin1.PictureScale = 1#
  208. End Sub
  209. Sub Form_Load ()
  210. ' Create the document
  211.     DMWin1.PictureScale = 2#
  212.     DMWin3.PictureScale = 1#
  213.         DMWin3.DocTitle = ""
  214.     DMWin3.CreateDocument = True
  215. ' Create page 3
  216.         DMWin3.PageTitle = "Page 3"
  217.         DMWin3.TemplateFile = ""
  218.         DMWin3.PaperWidth = 8.5
  219.         DMWin3.PaperHeight = 11#
  220.         DMWin3.Resolution = 300
  221.     DMWin3.CreatePage = True
  222. ' Three-D pie with patterned face
  223.         DMWin3.Pattern = 2
  224.         DMWin3.XPos = 5
  225.         DMWin3.YPos = 3
  226.         DMWin3.Radius = 1.5
  227.         DMWin3.Aspect = 1.2
  228.         DMWin3.StartAngle = 30
  229.         DMWin3.EndAngle = 120
  230.         DMWin3.ThreeDThickness = 1
  231.         DMWin3.FaceColor = RGB(0, 128, 128)
  232.         DMWin3.EdgeColor = RGB(0, 0, 255)
  233.     DMWin3.ThreeDPie = True
  234. ' Three-D pie with solid face
  235.         DMWin3.Pattern = -1
  236.         DMWin3.XPos = 2
  237.         DMWin3.YPos = 3
  238.     DMWin3.ThreeDPie = True
  239. ' Three-D Pie Chart
  240.         DMWin3.YPos = 7
  241.         DMWin3.XPos = 4.5
  242.         DMWin3.Aspect = .75
  243.         DMWin3.StartAngle = 60
  244.         DMWin3.EndAngle = 120
  245.         DMWin3.Pattern = -1
  246.         DMWin3.EdgeColor = RGB(0, 0, 255)
  247.         DMWin3.FaceColor = RGB(255, 255, 0)
  248.         DMWin3.ThreeDThickness = .4
  249.     DMWin3.ThreeDPie = True
  250.         DMWin3.StartAngle = 120
  251.         DMWin3.EndAngle = 240
  252.         DMWin3.FaceColor = RGB(255, 0, 255)
  253.     DMWin3.ThreeDPie = True
  254.         DMWin3.StartAngle = 340
  255.         DMWin3.EndAngle = 60
  256.         DMWin3.FaceColor = RGB(255, 0, 0)
  257.     DMWin3.ThreeDPie = True
  258.         DMWin3.YPos = 7.275
  259.         DMWin3.XPos = 4.675
  260.         DMWin3.StartAngle = 240
  261.         DMWin3.EndAngle = 340
  262.         DMWin3.FaceColor = RGB(0, 255, 255)
  263.     DMWin3.ThreeDPie = True
  264.     DMWin3.DrawNow = True
  265. End Sub
  266. Sub Form_Unload (Cancel As Integer)
  267.     DMWin3.DeleteDocument = True
  268. End Sub
  269.