home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic 4 Unleashed
/
Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso
/
bytech
/
test1.frm
< prev
next >
Wrap
Text File
|
1995-07-27
|
43KB
|
1,468 lines
VERSION 2.00
Begin Form Form1
Caption = "PrintWorks Demo"
ClientHeight = 4545
ClientLeft = 3375
ClientTop = 1335
ClientWidth = 4860
Height = 4950
Left = 3315
LinkTopic = "Form1"
ScaleHeight = 4545
ScaleWidth = 4860
Top = 990
Width = 4980
Begin CommandButton Command2
Caption = "Print Only"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "System"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
Left = 2520
TabIndex = 1
Top = 2520
Width = 1815
End
Begin DMWIN DMWin8
Aspect = 1
BackColor = &H00C0C0C0&
BackGroundColor = &H00000000&
Caption = "Print Only"
CurrentPoint = 1
DeskColor = &H00408000&
DisplayPageNum = 0
DocTitle = "Document Viewer"
EdgeColor = &H00000000&
EndAngle = 360
FaceColor = &H00000000&
FieldData = ""
FieldID = ""
FieldNumber = 1
FieldWidth = 5
Filename = ""
FirstPrintPage = 1
FormFile = ""
GetXTextPos = 0
GetYTextPos = 0
Height = 495
HideButton = -1 'True
hMetaDC = 0
Indent = 0.5
Italic = 0 'False
Justify = 0
Landscape = 0 'False
LastPrintPage = 1
Left = 2520
LineColor = &H00000000&
LineSpacing = 0.16
LineWeight = 0
LineWeightR = 0
MetaFile = ""
MultiLine = -1 'True
NameFont = "Arial"
NumPoints = 0
ObjHeight = 0
ObjWidth = 0
PageTitle = "Untitled"
PaperHeight = 11
PaperWidth = 8.5
Pattern = -1
PercentScreen = 95
PictureScale = 0
PrintAll = -1 'True
PrintCurrent = 0 'False
PrintDialog = -1 'True
PrintEventOnly = -1 'True
PrintRange = 0 'False
PrintText = ""
Radius = 0
Resolution = 300
Rotation = 0
ShadowWidth = 7
SizeFont = 12
StartAngle = 0
StartCloseUp = 0 'False
StretchBitmap = 0 'False
TemplateFile = ""
ThreeDAngle = 45
ThreeDThickness = 0.2
Top = 120
Underline = 0 'False
WeightFont = 3
Width = 1815
X2 = 0
XPos = 0
XPrintOffset = 0
Y2 = 0
YPos = 0
YPrintOffset = 0
End
Begin DMWIN DMWin7
Aspect = 1
BackColor = &H00C0C0C0&
BackGroundColor = &H00000000&
Caption = "Form & Data"
CurrentPoint = 1
DeskColor = &H00008000&
DisplayPageNum = 0
DocTitle = "Document Viewer"
EdgeColor = &H00000000&
EndAngle = 360
FaceColor = &H00000000&
FieldData = ""
FieldID = ""
FieldNumber = 1
FieldWidth = 5
Filename = ""
FirstPrintPage = 1
FormFile = ""
GetXTextPos = 0
GetYTextPos = 0
Height = 495
HideButton = 0 'False
hMetaDC = 0
Indent = 0.5
Italic = 0 'False
Justify = 0
Landscape = 0 'False
LastPrintPage = 1
Left = 2520
LineColor = &H00000000&
LineSpacing = 0.16
LineWeight = 0
LineWeightR = 0
MetaFile = ""
MultiLine = -1 'True
NameFont = "Arial"
NumPoints = 0
ObjHeight = 0
ObjWidth = 0
PageTitle = "Untitled"
PaperHeight = 11
PaperWidth = 8.5
Pattern = -1
PercentScreen = 95
PictureScale = 0
PrintAll = -1 'True
PrintCurrent = 0 'False
PrintDialog = -1 'True
PrintEventOnly = -1 'True
PrintRange = 0 'False
PrintText = ""
Radius = 0
Resolution = 300
Rotation = 0
ShadowWidth = 7
SizeFont = 12
StartAngle = 0
StartCloseUp = 0 'False
StretchBitmap = 0 'False
TemplateFile = ""
ThreeDAngle = 45
ThreeDThickness = 0.2
Top = 1920
Underline = 0 'False
WeightFont = 3
Width = 1815
X2 = 0
XPos = 0
XPrintOffset = 0
Y2 = 0
YPos = 0
YPrintOffset = 0
End
Begin DMWIN DMWin6
Aspect = 1
BackColor = &H00C0C0C0&
BackGroundColor = &H00000000&
Caption = "Rotated Text"
CurrentPoint = 1
DeskColor = &H00408000&
DisplayPageNum = 0
DocTitle = "Document Viewer"
EdgeColor = &H00000000&
EndAngle = 360
FaceColor = &H00000000&
FieldData = ""
FieldID = ""
FieldNumber = 1
FieldWidth = 5
Filename = ""
FirstPrintPage = 1
FormFile = ""
GetXTextPos = 0
GetYTextPos = 0
Height = 495
HideButton = 0 'False
hMetaDC = 0
Indent = 0.5
Italic = 0 'False
Justify = 0
Landscape = 0 'False
LastPrintPage = 1
Left = 2520
LineColor = &H00000000&
LineSpacing = 0.16
LineWeight = 0
LineWeightR = 0
MetaFile = ""
MultiLine = -1 'True
NameFont = "Arial"
NumPoints = 0
ObjHeight = 0
ObjWidth = 0
PageTitle = "Untitled"
PaperHeight = 11
PaperWidth = 8.5
Pattern = -1
PercentScreen = 95
PictureScale = 0
PrintAll = -1 'True
PrintCurrent = 0 'False
PrintDialog = -1 'True
PrintEventOnly = -1 'True
PrintRange = 0 'False
PrintText = ""
Radius = 0
Resolution = 300
Rotation = 0
ShadowWidth = 7
SizeFont = 12
StartAngle = 0
StartCloseUp = 0 'False
StretchBitmap = 0 'False
TemplateFile = ""
ThreeDAngle = 45
ThreeDThickness = 0.2
Top = 1320
Underline = 0 'False
WeightFont = 3
Width = 1815
X2 = 0
XPos = 0
XPrintOffset = 0
Y2 = 0
YPos = 0
YPrintOffset = 0
End
Begin DMWIN DMWin5
Aspect = 1
BackColor = &H00C0C0C0&
BackGroundColor = &H00000000&
Caption = "Fonts & Text"
CurrentPoint = 1
DeskColor = &H00408000&
DisplayPageNum = 0
DocTitle = "Document Viewer"
EdgeColor = &H00000000&
EndAngle = 360
FaceColor = &H00000000&
FieldData = ""
FieldID = ""
FieldNumber = 1
FieldWidth = 5
Filename = ""
FirstPrintPage = 1
FormFile = ""
GetXTextPos = 0
GetYTextPos = 0
Height = 495
HideButton = 0 'False
hMetaDC = 0
Indent = 0.5
Italic = 0 'False
Justify = 0
Landscape = 0 'False
LastPrintPage = 1
Left = 2520
LineColor = &H00000000&
LineSpacing = 0.16
LineWeight = 0
LineWeightR = 0
MetaFile = ""
MultiLine = -1 'True
NameFont = "Arial"
NumPoints = 0
ObjHeight = 0
ObjWidth = 0
PageTitle = "Untitled"
PaperHeight = 11
PaperWidth = 8.5
Pattern = -1
PercentScreen = 95
PictureScale = 0
PrintAll = -1 'True
PrintCurrent = 0 'False
PrintDialog = -1 'True
PrintEventOnly = -1 'True
PrintRange = 0 'False
PrintText = ""
Radius = 0
Resolution = 300
Rotation = 0
ShadowWidth = 7
SizeFont = 12
StartAngle = 0
StartCloseUp = 0 'False
StretchBitmap = 0 'False
TemplateFile = ""
ThreeDAngle = 45
ThreeDThickness = 0.2
Top = 720
Underline = 0 'False
WeightFont = 3
Width = 1815
X2 = 0
XPos = 0
XPrintOffset = 0
Y2 = 0
YPos = 0
YPrintOffset = 0
End
Begin DMWIN DMWin4
Aspect = 1
BackColor = &H00C0C0C0&
BackGroundColor = &H00000000&
Caption = "Filled Objects"
CurrentPoint = 1
DeskColor = &H00408000&
DisplayPageNum = 0
DocTitle = "Document Viewer"
EdgeColor = &H00000000&
EndAngle = 360
FaceColor = &H00000000&
FieldData = ""
FieldID = ""
FieldNumber = 1
FieldWidth = 5
Filename = ""
FirstPrintPage = 1
FormFile = ""
GetXTextPos = 0
GetYTextPos = 0
Height = 495
HideButton = 0 'False
hMetaDC = 0
Indent = 0.5
Italic = 0 'False
Justify = 0
Landscape = 0 'False
LastPrintPage = 1
Left = 480
LineColor = &H00000000&
LineSpacing = 0.16
LineWeight = 0
LineWeightR = 0
MetaFile = ""
MultiLine = -1 'True
NameFont = "Arial"
NumPoints = 0
ObjHeight = 0
ObjWidth = 0
PageTitle = "Untitled"
PaperHeight = 11
PaperWidth = 8.5
Pattern = -1
PercentScreen = 95
PictureScale = 0
PrintAll = -1 'True
PrintCurrent = 0 'False
PrintDialog = -1 'True
PrintEventOnly = -1 'True
PrintRange = 0 'False
PrintText = ""
Radius = 0
Resolution = 300
Rotation = 0
ShadowWidth = 7
SizeFont = 12
StartAngle = 0
StartCloseUp = 0 'False
StretchBitmap = 0 'False
TemplateFile = ""
ThreeDAngle = 45
ThreeDThickness = 0.2
Top = 1320
Underline = 0 'False
WeightFont = 3
Width = 1815
X2 = 0
XPos = 0
XPrintOffset = 0
Y2 = 0
YPos = 0
YPrintOffset = 0
End
Begin DMWIN DMWin3
Aspect = 1
BackColor = &H00C0C0C0&
BackGroundColor = &H00000000&
Caption = "Three-D Pie"
CurrentPoint = 1
DeskColor = &H00408000&
DisplayPageNum = 0
DocTitle = "Document Viewer"
EdgeColor = &H00000000&
EndAngle = 360
FaceColor = &H00000000&
FieldData = ""
FieldID = ""
FieldNumber = 1
FieldWidth = 5
Filename = ""
FirstPrintPage = 1
FormFile = ""
GetXTextPos = 0
GetYTextPos = 0
Height = 495
HideButton = 0 'False
hMetaDC = 0
Indent = 0.5
Italic = 0 'False
Justify = 0
Landscape = 0 'False
LastPrintPage = 1
Left = 480
LineColor = &H00000000&
LineSpacing = 0.16
LineWeight = 0
LineWeightR = 0
MetaFile = ""
MultiLine = -1 'True
NameFont = "Arial"
NumPoints = 0
ObjHeight = 0
ObjWidth = 0
PageTitle = "Untitled"
PaperHeight = 11
PaperWidth = 8.5
Pattern = -1
PercentScreen = 95
PictureScale = 0
PrintAll = -1 'True
PrintCurrent = 0 'False
PrintDialog = -1 'True
PrintEventOnly = -1 'True
PrintRange = 0 'False
PrintText = ""
Radius = 0
Resolution = 300
Rotation = 0
ShadowWidth = 7
SizeFont = 12
StartAngle = 0
StartCloseUp = 0 'False
StretchBitmap = 0 'False
TemplateFile = ""
ThreeDAngle = 45
ThreeDThickness = 0.2
Top = 2520
Underline = 0 'False
WeightFont = 3
Width = 1815
X2 = 0
XPos = 0
XPrintOffset = 0
Y2 = 0
YPos = 0
YPrintOffset = 0
End
Begin DMWIN DMWin2
Aspect = 1
BackColor = &H00C0C0C0&
BackGroundColor = &H00000000&
Caption = "Three-D Bar"
CurrentPoint = 1
DeskColor = &H00408000&
DisplayPageNum = 0
DocTitle = "Document Viewer"
EdgeColor = &H00000000&
EndAngle = 360
FaceColor = &H00000000&
FieldData = ""
FieldID = ""
FieldNumber = 1
FieldWidth = 5
Filename = ""
FirstPrintPage = 1
FormFile = ""
GetXTextPos = 0
GetYTextPos = 0
Height = 495
HideButton = 0 'False
hMetaDC = 0
Indent = 0.5
Italic = 0 'False
Justify = 0
Landscape = 0 'False
LastPrintPage = 1
Left = 480
LineColor = &H00000000&
LineSpacing = 0.16
LineWeight = 0
LineWeightR = 0
MetaFile = ""
MultiLine = -1 'True
NameFont = "Arial"
NumPoints = 0
ObjHeight = 0
ObjWidth = 0
PageTitle = "Untitled"
PaperHeight = 11
PaperWidth = 8.5
Pattern = -1
PercentScreen = 95
PictureScale = 0
PrintAll = -1 'True
PrintCurrent = 0 'False
PrintDialog = -1 'True
PrintEventOnly = -1 'True
PrintRange = 0 'False
PrintText = ""
Radius = 0
Resolution = 300
Rotation = 0
ShadowWidth = 7
SizeFont = 12
StartAngle = 0
StartCloseUp = 0 'False
StretchBitmap = 0 'False
TemplateFile = ""
ThreeDAngle = 0
ThreeDThickness = 0.2
Top = 1920
Underline = 0 'False
WeightFont = 3
Width = 1815
X2 = 0
XPos = 0
XPrintOffset = 0
Y2 = 0
YPos = 0
YPrintOffset = 0
End
Begin DMWIN DMWin1
Aspect = 1
BackColor = &H00C0C0C0&
BackGroundColor = &H00000000&
Caption = "Line Objects"
CurrentPoint = 1
DeskColor = &H00408000&
DisplayPageNum = 0
DocTitle = "Document Viewer"
EdgeColor = &H00000000&
EndAngle = 360
FaceColor = &H00000000&
FieldData = ""
FieldID = ""
FieldNumber = 1
FieldWidth = 5
Filename = ""
FirstPrintPage = 1
FormFile = ""
GetXTextPos = 0
GetYTextPos = 0
Height = 495
HideButton = 0 'False
hMetaDC = 0
Indent = 0.5
Italic = 0 'False
Justify = 0
Landscape = 0 'False
LastPrintPage = 1
Left = 480
LineColor = &H00000000&
LineSpacing = 0.16
LineWeight = 0
LineWeightR = 0
MetaFile = ""
MultiLine = -1 'True
NameFont = "Arial"
NumPoints = 0
ObjHeight = 0
ObjWidth = 0
PageTitle = "Untitled"
PaperHeight = 11
PaperWidth = 8.5
Pattern = -1
PercentScreen = 95
PictureScale = 0
PrintAll = -1 'True
PrintCurrent = 0 'False
PrintDialog = -1 'True
PrintEventOnly = -1 'True
PrintRange = 0 'False
PrintText = ""
Radius = 0
Resolution = 300
Rotation = 0
ShadowWidth = 7
SizeFont = 12
StartAngle = 0
StartCloseUp = 0 'False
StretchBitmap = 0 'False
TemplateFile = ""
ThreeDAngle = 0
ThreeDThickness = 0
Top = 720
Underline = 0 'False
WeightFont = 3
Width = 1815
X2 = 0
XPos = 0
XPrintOffset = 0
Y2 = 0
YPos = 0
YPrintOffset = 0
End
Begin CommandButton Command1
Caption = "Quit"
Height = 735
Left = 480
TabIndex = 0
Top = 3240
Width = 3855
End
End
Declare Function MoveTo Lib "GDI" (ByVal hdc%, ByVal x%, ByVal y%) As Integer
Declare Function LineTo Lib "GDI" (ByVal hdc%, ByVal x%, ByVal y%) As Integer
Sub Command1_Click ()
End
End Sub
Sub Command2_Click ()
' Create the document
DMWin8.DocTitle = "Print Only Demo"
DMWin8.CreateDocument = True
' Create the first page
DMWin8.PageTitle = "Page 1"
DMWin8.TemplateFile = "dmwin.tf"
DMWin8.PaperWidth = 8.5
DMWin8.PaperHeight = 11#
DMWin8.Resolution = 300
DMWin8.CreatePage = True
' Add a metafile
DMWin8.MetaFile = "dmwin.wmf"
DMWin8.XPos = .1
DMWin8.YPos = .1
DMWin8.ObjWidth = 1
DMWin8.ObjHeight = 1
DMWin8.MergeMetaFile = True
' Add the form
DMWin8.FormFile = "dmwin.wmf"
DMWin8.MergeForm = True
' Add the data
DMWin8.ClearFields = True
DMWin8.FieldNumber = 1
DMWin8.FieldData = "John R. Smith"
DMWin8.FillFieldNumber = True
DMWin8.FieldNumber = 2
DMWin8.FieldData = "21 Oriole Lane"
DMWin8.FillFieldNumber = True
DMWin8.FieldNumber = 3
DMWin8.FieldData = "White Plains, NY"
DMWin8.FillFieldNumber = True
' Create page 2
DMWin8.PageTitle = "Page 2"
DMWin8.TemplateFile = "dmwin.tf"
DMWin8.PaperWidth = 8.5
DMWin8.PaperHeight = 11#
DMWin8.Resolution = 300
DMWin8.CreatePage = True
' Add the form
DMWin8.FormFile = "dmwin.wmf"
DMWin8.MergeForm = True
' Add data
DMWin8.ClearFields = True
DMWin8.FieldID = "IDG_NAME"
DMWin8.FieldData = "Billy T. Kidd"
DMWin8.FillFieldID = True
DMWin8.FieldID = "IDG_ADDRESS1"
DMWin8.FieldData = "Boot Hill"
DMWin8.FillFieldID = True
DMWin8.FieldID = "IDG_ADDRESS2"
DMWin8.FieldData = "Dodge City, KS"
DMWin8.FillFieldID = True
' Choose one of five print options
PrintOption% = 5
If PrintOption% = 1 Then
' Set up Option 1 - All Pages
DMWin8.PrintAll = True
DMWin8.PrintDialog = False
ElseIf PrintOption% = 2 Then
' Set up Option 2 - Range of pages (the range is entire doc,
' since we only have 2 pages)
DMWin8.PrintAll = False
DMWin8.PrintDialog = False
DMWin8.FirstPrintPage = 1
DMWin8.LastPrintPage = 2
ElseIf PrintOption% = 3 Then
' Set up Option 3 - First page only
DMWin8.PrintAll = False
DMWin8.PrintDialog = False
DMWin8.FirstPrintPage = 1
DMWin8.LastPrintPage = 1
ElseIf PrintOption% = 4 Then
' Set up Option 4 - Last page only
DMWin8.PrintAll = False
DMWin8.PrintDialog = False
DMWin8.FirstPrintPage = 2
DMWin8.LastPrintPage = 2
' Set up Option 5 - Use built in print dialog
ElseIf PrintOption% = 5 Then
DMWin8.PrintAll = False
DMWin8.PrintDialog = True
DMWin8.FirstPrintPage = 2
DMWin8.LastPrintPage = 2
End If
' Print the document
DMWin8.PrintDocument = True
' Delete the document - DON'T FORGET THIS STEP
DMWin8.DeleteDocument = True
End Sub
Sub DMWin1_ClickIn ()
' Create the document
DMWin1.DocTitle = "Line Objects Demo"
DMWin1.CreateDocument = True
' Create the page
DMWin1.PageTitle = "Page 1"
DMWin1.TemplateFile = ""
DMWin1.PaperWidth = 8.5
DMWin1.PaperHeight = 11#
DMWin1.Resolution = 300
DMWin1.Landscape = False
DMWin1.CreatePage = True
' Direct GDI API calls
success% = MoveTo(DMWin1.hMetaDC, 0, 0)
success% = LineTo(DMWin1.hMetaDC, 330, 230)
' Various line weights
DMWin1.LineColor = RGB(0, 0, 0)
DMWin1.XPos = .5
DMWin1.X2 = 2
y! = 1
For i% = 1 To 10
DMWin1.YPos = y!
DMWin1.Y2 = y!
DMWin1.LineWeight = i%
DMWin1.DrawLine = True
y! = y! + .1
Next i%
' Diagonal lines
DMWin1.LineColor = RGB(255, 0, 0)
DMWin1.LineWeight = 1
DMWin1.XPos = 3
DMWin1.YPos = 1
DMWin1.X2 = 4
DMWin1.Y2 = 2
DMWin1.DrawLine = True
DMWin1.XPos = 4
DMWin1.X2 = 3
DMWin1.DrawLine = True
' Rectangle
DMWin1.XPos = .25
DMWin1.YPos = .25
DMWin1.X2 = 8.25
DMWin1.Y2 = 10.75
DMWin1.LineColor = RGB(0, 0, 0)
DMWin1.LineWeight = 1
DMWin1.Rectangle = True
DMWin1.XPos = 5
DMWin1.YPos = .5
DMWin1.X2 = 7
DMWin1.Y2 = 2
DMWin1.LineColor = RGB(0, 0, 255)
DMWin1.LineWeightR = 12 / DMWin1.Resolution
DMWin1.Rectangle = True
DMWin1.XPos = 5 + .01
DMWin1.YPos = .5 + .01
DMWin1.X2 = 7 - .01
DMWin1.Y2 = 2 - .01
DMWin1.LineColor = RGB(255, 0, 255)
DMWin1.LineWeight = 3
DMWin1.Rectangle = True
' Circles with various aspects
DMWin1.LineColor = RGB(0, 0, 0)
DMWin1.XPos = 1.5
DMWin1.YPos = 4
DMWin1.Radius = 1
DMWin1.Aspect = 1
DMWin1.StartAngle = 0
DMWin1.EndAngle = 360
DMWin1.LineWeightR = 0
DMWin1.DrawCircle = True
DMWin1.XPos = 4
DMWin1.Aspect = 1.5
DMWin1.DrawCircle = True
DMWin1.XPos = 6.5
DMWin1.Aspect = .75
DMWin1.DrawCircle = True
' Arcs
DMWin1.XPos = 1.5
DMWin1.YPos = 7
DMWin1.Radius = 1
DMWin1.Aspect = 1
DMWin1.StartAngle = 30
DMWin1.EndAngle = 160
DMWin1.LineWeight = 3
DMWin1.DrawCircle = True
DMWin1.XPos = 4
DMWin1.StartAngle = 160
DMWin1.EndAngle = 30
DMWin1.DrawCircle = True
' Pie
DMWin1.XPos = 6.5
DMWin1.StartAngle = 210
DMWin1.EndAngle = 330
DMWin1.Pie = True
DMWin1.Preview = True
End Sub
Sub DMWin2_ClickIn ()
' Create the document
DMWin2.DocTitle = "Three-D Bar Demo"
DMWin2.DeskColor = RGB(255, 255, 255)
DMWin2.CreateDocument = True
' Create the page
DMWin2.PageTitle = "Page 1"
DMWin2.TemplateFile = ""
DMWin2.PaperWidth = 8.5
DMWin2.PaperHeight = 11#
DMWin2.Resolution = 300
DMWin2.CreatePage = True
' Horizontal line for bitmap background demo
DMWin2.XPos = 0
DMWin2.YPos = .2
DMWin2.X2 = 5
DMWin2.Y2 = .2
DMWin2.LineColor = 0
DMWin2.DrawLine = True
' Add bitmap from disk - Opaque
DMWin2.Filename = "cat.bmp"
DMWin2.XPos = .5
DMWin2.YPos = .1
DMWin2.ObjWidth = .35
DMWin2.ObjHeight = .35
DMWin2.StretchBitmap = True
DMWin2.FaceColor = RGB(255, 255, 0)
DMWin2.BackGroundColor = RGB(255, 0, 255)
DMWin2.MakeOpaque = True
DMWin2.DrawBitmap = True
' Add bitmap from disk - Transparent
DMWin2.Filename = "cat.bmp"
DMWin2.XPos = 2.5
DMWin2.YPos = .1
DMWin2.ObjWidth = .35
DMWin2.ObjHeight = .35
DMWin2.StretchBitmap = True
DMWin2.FaceColor = RGB(255, 255, 0)
DMWin2.BackGroundColor = RGB(255, 0, 255)
DMWin2.MakeTransparent = True
DMWin2.DrawBitmap = True
' Three-D Bar with patterned face
DMWin2.FaceColor = RGB(0, 255, 255)
DMWin2.EdgeColor = RGB(0, 0, 255)
DMWin2.BackGroundColor = RGB(192, 192, 0)
DMWin2.ObjWidth = .4
DMWin2.ObjHeight = .85
DMWin2.XPos = .25
DMWin2.YPos = 1.5
DMWin2.Pattern = 3
DMWin2.ThreeDThickness = .1
DMWin2.ThreeDAngle = 45
DMWin2.ThreeDBar = True
' Three-D Bar with solid face
DMWin2.XPos = 1
DMWin2.Pattern = -1
DMWin2.ObjHeight = 1.25
DMWin2.ThreeDBar = True
' Stacked Three-D Bar
DMWin2.XPos = 1.75
DMWin2.ObjHeight = .7
DMWin2.FaceColor = RGB(0, 255, 255)
DMWin2.Pattern = -1
DMWin2.ThreeDBar = True
DMWin2.YPos = DMWin2.YPos - DMWin2.ObjHeight
DMWin2.ObjHeight = 1 - DMWin2.ObjHeight
DMWin2.FaceColor = RGB(0, 255, 0)
DMWin2.Pattern = -1
DMWin2.ThreeDBar = True
' Add bitmap from disk
DMWin2.Filename = "cat.bmp"
DMWin2.XPos = .1
DMWin2.YPos = .1
DMWin2.ObjWidth = .35
DMWin2.ObjHeight = .35
DMWin2.StretchBitmap = True
DMWin2.FaceColor = RGB(0, 0, 0)
DMWin2.BackGroundColor = RGB(255, 255, 255)
DMWin2.DrawBitmap = True
' Save Page to disk metafile
DMWin2.Filename = "saved.wmf"
DMWin2.SavePage = True
' Start preview close up
DMWin2.StartCloseUp = True
' Preview
DMWin2.Preview = True
End Sub
Sub DMWin3_ClickIn ()
' Create the document
DMWin3.DocTitle = "Three-D Pie Demo"
DMWin3.CreateDocument = True
' Create the page
DMWin3.PageTitle = "Page 1"
DMWin3.TemplateFile = ""
DMWin3.PaperWidth = 8.5
DMWin3.PaperHeight = 11#
DMWin3.Resolution = 300
DMWin3.CreatePage = True
' Three-D pie with patterned face
DMWin3.Pattern = 2
DMWin3.XPos = 5
DMWin3.YPos = 3
DMWin3.Radius = 1.5
DMWin3.Aspect = 1.2
DMWin3.StartAngle = 30
DMWin3.EndAngle = 120
DMWin3.ThreeDThickness = 1
DMWin3.FaceColor = RGB(0, 128, 128)
DMWin3.EdgeColor = RGB(0, 0, 255)
DMWin3.ThreeDPie = True
' Three-D pie with solid face
DMWin3.Pattern = -1
DMWin3.XPos = 2
DMWin3.YPos = 3
DMWin3.ThreeDPie = True
' Three-D Pie Chart
DMWin3.YPos = 7
DMWin3.XPos = 4.5
DMWin3.Aspect = .75
DMWin3.StartAngle = 60
DMWin3.EndAngle = 120
DMWin3.Pattern = -1
DMWin3.EdgeColor = RGB(0, 0, 255)
DMWin3.FaceColor = RGB(255, 255, 0)
DMWin3.ThreeDThickness = .4
DMWin3.ThreeDPie = True
DMWin3.StartAngle = 120
DMWin3.EndAngle = 240
DMWin3.FaceColor = RGB(255, 0, 255)
DMWin3.ThreeDPie = True
DMWin3.StartAngle = 340
DMWin3.EndAngle = 60
DMWin3.FaceColor = RGB(255, 0, 0)
DMWin3.ThreeDPie = True
DMWin3.YPos = 7.275
DMWin3.XPos = 4.675
DMWin3.StartAngle = 240
DMWin3.EndAngle = 340
DMWin3.FaceColor = RGB(0, 255, 255)
DMWin3.ThreeDPie = True
DMWin3.Preview = True
End Sub
Sub DMWin4_ClickIn ()
' Create Document
DMWin4.DocTitle = "Filled Objects Demo"
DMWin4.DeskColor = RGB(192, 192, 192)
DMWin4.CreateDocument = True
' Create Page
DMWin4.PageTitle = "Page 1"
DMWin4.TemplateFile = ""
DMWin4.PaperWidth = 8.5
DMWin4.PaperHeight = 11#
DMWin4.Resolution = 300
DMWin4.CreatePage = True
' Filled Rectangle with solid face
DMWin4.LineWeight = 5
DMWin4.XPos = 1
DMWin4.YPos = 1
DMWin4.X2 = 3
DMWin4.Y2 = 3
DMWin4.FaceColor = RGB(255, 255, 0)
DMWin4.EdgeColor = RGB(0, 255, 0)
DMWin4.BackGroundColor = RGB(0, 255, 0)
DMWin4.Pattern = -1
DMWin4.FillRectangle = True
' Filled Rectangle with patterned face
DMWin4.LineWeight = 5
DMWin4.XPos = 4
DMWin4.YPos = 1
DMWin4.X2 = 6
DMWin4.Y2 = 3
DMWin4.FaceColor = RGB(255, 255, 0)
DMWin4.EdgeColor = RGB(0, 255, 0)
DMWin4.BackGroundColor = RGB(0, 255, 0)
DMWin4.Pattern = 5
DMWin4.FillRectangle = True
' Filled Polygon with solid face
ReDim x!(4), y!(4)
x!(1) = 1: y!(1) = 4
x!(2) = 3: y!(2) = 4.5
x!(3) = 1.5: y!(3) = 5.5
x!(4) = .75: y!(4) = 4.3
For i% = 1 To 4
DMWin4.XPos = x!(i%)
DMWin4.YPos = y!(i%)
DMWin4.CurrentPoint = i%
DMWin4.SetPoint = True
Next i%
DMWin4.NumPoints = 4
DMWin4.Pattern = -1
DMWin4.FillPolygon = True
' Filled Polygon with patterned face
For i% = 1 To 4
DMWin4.XPos = x!(i%) + 3
DMWin4.YPos = y!(i%)
DMWin4.CurrentPoint = i%
DMWin4.SetPoint = True
Next i%
DMWin4.NumPoints = 4
DMWin4.Pattern = 0
DMWin4.FillPolygon = True
' Filled Pie with solid face
DMWin4.LineWeight = 3
DMWin4.XPos = 2
DMWin4.YPos = 7
DMWin4.Radius = 1.5
DMWin4.Aspect = .75
DMWin4.StartAngle = 300
DMWin4.EndAngle = 240
DMWin4.Pattern = -1
DMWin4.FaceColor = RGB(255, 255, 0)
DMWin4.EdgeColor = RGB(0, 0, 0)
DMWin4.FillCircle = True
' Filled Pie with opaque patterned face
DMWin4.XPos = 3
DMWin4.Pattern = 5
DMWin4.MakeOpaque = True
DMWin4.FillCircle = True
' Filled Pie with transparent patterned face
DMWin4.XPos = 4
DMWin4.Pattern = 5
DMWin4.MakeTransparent = True
DMWin4.FillCircle = True
' Preview
DMWin4.DeskColor = RGB(192, 192, 192)
DMWin4.Preview = True
End Sub
Sub DMWin5_ClickIn ()
' Create the document
DMWin5.DocTitle = "Fonts & Text Demo"
DMWin5.CreateDocument = True
' Create the page
DMWin5.PageTitle = "Page 1"
DMWin5.TemplateFile = ""
DMWin5.PaperWidth = 8.5
DMWin5.PaperHeight = 11#
DMWin5.Resolution = 300
DMWin5.CreatePage = True
' Select a font
DMWin5.NameFont = "Arial"
DMWin5.SizeFont = 18#
DMWin5.WeightFont = 5 ' medium
DMWin5.Italic = False
DMWin5.Underline = False
DMWin5.Rotation = 0 ' portrait
'DMWin5.Rotation = 90 ' landscape
'DMWin5.Rotation = 180 ' reverse portrait
'DMWin5.Rotation = 270 ' reverse landscape
DMWin5.SelectFont = True
' Print some text - left justified
DMWin5.XPos = 1
DMWin5.YPos = 1.5
DMWin5.PrintText = "This is left justified."
DMWin5.FieldWidth = 5
DMWin5.Indent = 0
DMWin5.LineSpacing = 1 / 4
DMWin5.Justify = 0
DMWin5.MultiLine = False
DMWin5.Paragraph = True
' Print some text - centered
DMWin5.LineColor = RGB(255, 0, 0)
DMWin5.YPos = 2
DMWin5.PrintText = "This is centered."
DMWin5.Justify = 1
DMWin5.Paragraph = True
' Print some text - right justified
DMWin5.LineColor = RGB(0, 0, 255)
DMWin5.YPos = 2.5
DMWin5.PrintText = "This is right justified"
DMWin5.Justify = 2
DMWin5.Paragraph = True
' Print some text - fully justified
DMWin5.LineColor = RGB(0, 0, 0)
DMWin5.Indent = .4
DMWin5.YPos = 3
DMWin5.PrintText = "This is some fully justified text with word wrap and indentation."
DMWin5.Justify = 3
DMWin4.MultiLine = True
DMWin5.Paragraph = True
' Print some text - decimal aligned
DMWin5.LineColor = RGB(0, 0, 0)
DMWin5.Indent = 0
DMWin5.XPos = 3
DMWin5.Justify = 4
DMWin5.YPos = 4
DMWin5.PrintText = "$ 1,000.00 <- Decimal aligned"
DMWin5.Paragraph = True
DMWin5.YPos = 4.25
DMWin5.PrintText = "59.99"
DMWin5.Paragraph = True
DMWin5.YPos = 4.5
DMWin5.PrintText = "12,032.45"
DMWin5.Paragraph = True
DMWin5.YPos = 4.75
DMWin5.PrintText = "750.00"
DMWin5.Paragraph = True
DMWin5.WeightFont = 7
DMWin5.SelectFont = True
DMWin5.Justify = 4
DMWin5.YPos = 5.15
DMWin5.PrintText = "Total: $ 13,842.44"
DMWin5.Paragraph = True
' Draw some guide lines (box)
If DMWin5.Rotation = 0 Then
DMWin5.XPos = 1
DMWin5.YPos = 1
DMWin5.X2 = 6
DMWin5.Y2 = 6
ElseIf DMWin5.Rotation = 90 Then
DMWin5.XPos = 1
DMWin5.YPos = 5
DMWin5.X2 = 6
DMWin5.Y2 = 10
ElseIf DMWin5.Rotation = 180 Then
DMWin5.XPos = 2.5
DMWin5.YPos = 5
DMWin5.X2 = 7.5
DMWin5.Y2 = 10
ElseIf DMWin5.Rotation = 270 Then
DMWin5.XPos = 2.5
DMWin5.YPos = 1
DMWin5.X2 = 7.5
DMWin5.Y2 = 6
End If
DMWin5.LineWeight = 1
DMWin5.LineColor = 0
DMWin5.Rectangle = True
DMWin5.XPrintOffset = .25
DMWin5.YPrintOffset = .25
DMWin5.Preview = True
End Sub
Sub DMWin6_ClickIn ()
' Create the document
DMWin6.DocTitle = "Rotated Text Demo"
DMWin6.CreateDocument = True
' Create the page
DMWin6.PageTitle = "Page 1"
DMWin6.TemplateFile = ""
DMWin6.PaperWidth = 8.5
DMWin6.PaperHeight = 11#
DMWin6.Resolution = 300
DMWin6.CreatePage = True
' Set text properties
DMWin6.XPos = 4.25
DMWin6.YPos = 5.5
DMWin6.PrintText = " Rotated Text"
DMWin6.FieldWidth = 5
DMWin6.Indent = 0
DMWin6.MultiLine = False
DMWin6.LineSpacing = 1 / 4
DMWin6.Justify = 0
' Display circle of text objects
For i% = 5 To 355 Step 20
' Select rotated font
DMWin6.NameFont = "Arial"
DMWin6.SizeFont = 36#
DMWin6.WeightFont = 7 ' bold
DMWin6.Italic = False
DMWin6.Underline = False
DMWin6.Rotation = i% ' portrait
DMWin6.SelectFont = True
' Print text
DMWin6.Paragraph = True
Next i%
' Preview
DMWin6.PrintEventOnly = True
DMWin6.Preview = True
End Sub
Sub DMWin6_PreviewClosing ()
MsgBox "Preview Closing."
End Sub
Sub DMWin6_PrintEvent ()
MsgBox "Print Event Fired."
End Sub
Sub DMWin7_ClickIn ()
' Create the document
DMWin7.DocTitle = "Multiple Page Form & Data Demo"
DMWin7.CreateDocument = True
' Create the first page
DMWin7.PageTitle = "Page 1"
DMWin7.TemplateFile = "dmwin.tf"
DMWin7.PaperWidth = 8.5
DMWin7.PaperHeight = 11#
DMWin7.Landscape = False
DMWin7.Resolution = 300
DMWin7.CreatePage = True
' Add some text and graphics
' Select a font
DMWin7.NameFont = "Arial"
DMWin7.SizeFont = 18#
DMWin7.WeightFont = 5 ' medium
DMWin7.Italic = False
DMWin7.Underline = False
DMWin7.Rotation = 0 ' portrait
DMWin7.SelectFont = True
' Print some text - left justified
DMWin7.XPos = 1
DMWin7.YPos = 5.5
DMWin7.PrintText = "Sample text"
DMWin7.FieldWidth = 5
DMWin7.Indent = 0
DMWin7.LineSpacing = 1 / 4
DMWin7.Justify = 0
DMWin7.MultiLine = False
DMWin7.Paragraph = True
' Draw a cross hairs
DMWin7.XPos = 1
DMWin7.YPos = 5
DMWin7.X2 = 1
DMWin7.Y2 = 6
DMWin7.DrawLine = True
DMWin7.XPos = .5
DMWin7.YPos = 5.5
DMWin7.X2 = 1.5
DMWin7.Y2 = 5.5
DMWin7.DrawLine = True
' Add a metafile
DMWin7.MetaFile = "bird.wmf"
DMWin7.XPos = .5
DMWin7.YPos = 2.5
DMWin7.ObjWidth = 1
DMWin7.ObjHeight = .85
DMWin7.MergeMetaFile = True
' Add a form
DMWin7.FormFile = "dmwin.wmf"
DMWin7.MergeForm = True
' Add the data
DMWin7.ClearFields = True
DMWin7.FieldNumber = 1
DMWin7.FieldData = "John R. Smith"
DMWin7.FillFieldNumber = True
DMWin7.FieldNumber = 2
DMWin7.FieldData = "21 Oriole Lane"
DMWin7.FillFieldNumber = True
DMWin7.FieldNumber = 3
DMWin7.FieldData = "White Plains, NY"
DMWin7.FillFieldNumber = True
' Create the second page using Metric Units
DMWin7.PageTitle = "Page 2 - Metric Units"
DMWin7.TemplateFile = "dmwinmet.tf"
DMWin7.PaperWidth = 21.59
DMWin7.PaperHeight = 27.94
DMWin7.Landscape = False
DMWin7.Resolution = 118.11
DMWin7.CreatePage = True
' Add some text and graphics
' Select a font
DMWin7.NameFont = "Arial"
DMWin7.SizeFont = 18# * 2.54
DMWin7.WeightFont = 5 ' medium
DMWin7.Italic = False
DMWin7.Underline = False
DMWin7.Rotation = 0 ' portrait
DMWin7.SelectFont = True
' Print some text - left justified
DMWin7.XPos = 1 * 2.54
DMWin7.YPos = 5.5 * 2.54
DMWin7.PrintText = "Sample text"
DMWin7.FieldWidth = 5 * 2.54
DMWin7.Indent = 0
DMWin7.LineSpacing = 1 * 2.54 / 4
DMWin7.Justify = 0
DMWin7.MultiLine = False
DMWin7.Paragraph = True
' Draw a cross hairs
DMWin7.XPos = 1 * 2.54
DMWin7.YPos = 5 * 2.54
DMWin7.X2 = 1 * 2.54
DMWin7.Y2 = 6 * 2.54
DMWin7.DrawLine = True
DMWin7.XPos = .5 * 2.54
DMWin7.YPos = 5.5 * 2.54
DMWin7.X2 = 1.5 * 2.54
DMWin7.Y2 = 5.5 * 2.54
DMWin7.DrawLine = True
' Add a form
DMWin7.FormFile = "dmwinmet.wmf"
DMWin7.MergeForm = True
' Add a metafile
DMWin7.MetaFile = "bird.wmf"
DMWin7.XPos = 1.27
DMWin7.YPos = 6.35
DMWin7.ObjWidth = 2.54
DMWin7.ObjHeight = 2.16
DMWin7.MergeMetaFile = True
' Add the data
DMWin7.ClearFields = True
DMWin7.FieldID = "IDG_NAME"
DMWin7.FieldData = "Billy T. Kidd"
DMWin7.FillFieldID = True
DMWin7.FieldID = "IDG_ADDRESS1"
DMWin7.FieldData = "Boot Hill"
DMWin7.FillFieldID = True
DMWin7.FieldID = "IDG_ADDRESS2"
DMWin7.FieldData = "Dodge City, KS"
DMWin7.FillFieldID = True
' Create the third page - landscape orientation
DMWin7.PageTitle = "Page 3 - Landscape Orientation"
DMWin7.TemplateFile = ""
DMWin7.PaperWidth = 11#
DMWin7.PaperHeight = 8.5
DMWin7.Landscape = True
DMWin7.Resolution = 300
DMWin7.CreatePage = True
' Select a font
DMWin7.NameFont = "Arial"
DMWin7.SizeFont = 18#
DMWin7.WeightFont = 5 ' medium
DMWin7.Italic = False
DMWin7.Underline = False
DMWin7.Rotation = 0 ' portrait
DMWin7.SelectFont = True
' Print some text - left justified
DMWin7.XPos = 1
DMWin7.YPos = 1.5
DMWin7.PrintText = "Sample landscape text."
DMWin7.FieldWidth = 5
DMWin7.Indent = 0
DMWin7.LineSpacing = 1 / 4
DMWin7.Justify = 0
DMWin7.MultiLine = False
DMWin7.Paragraph = True
' Preview it
DMWin7.Preview = True
End Sub