home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code2
/
scg_demo
/
samples.frm
< prev
next >
Wrap
Text File
|
1993-08-10
|
14KB
|
431 lines
VERSION 2.00
Begin Form frmSamples
BackColor = &H00C0C0C0&
Caption = "Samples"
ClientHeight = 5790
ClientLeft = 2445
ClientTop = 1485
ClientWidth = 7365
ControlBox = 0 'False
Height = 6195
Left = 2385
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5790
ScaleWidth = 7365
Top = 1140
Width = 7485
Begin Frame Shadow
BackColor = &H00C0C0C0&
Caption = "Shadow"
Height = 1095
Left = 4440
TabIndex = 4
Top = 4560
Width = 2775
Begin OptionButton ShadowOff
BackColor = &H00C0C0C0&
Caption = "Off"
Height = 255
Left = 240
TabIndex = 6
Top = 720
Value = -1 'True
Width = 2175
End
Begin OptionButton ShadowOn
BackColor = &H00C0C0C0&
Caption = "On"
Height = 255
Left = 240
TabIndex = 5
Top = 360
Width = 2175
End
End
Begin Frame FrameFill
BackColor = &H00C0C0C0&
Caption = "Fill Pattern"
Height = 1815
Left = 4440
TabIndex = 0
Top = 2640
Width = 2775
Begin OptionButton GradDiag
BackColor = &H00C0C0C0&
Caption = "Graduated Diagonal"
Height = 255
Left = 240
TabIndex = 7
Top = 1440
Width = 2295
End
Begin OptionButton GradHorz
BackColor = &H00C0C0C0&
Caption = "Graduated Horizontal"
Height = 255
Left = 240
TabIndex = 3
Top = 1080
Value = -1 'True
Width = 2295
End
Begin OptionButton GradVert
BackColor = &H00C0C0C0&
Caption = "Graduated Vertical"
Height = 255
Left = 240
TabIndex = 2
Top = 720
Width = 2415
End
Begin OptionButton Solid
BackColor = &H00C0C0C0&
Caption = "Solid"
Height = 255
Left = 240
TabIndex = 1
Top = 360
Width = 2295
End
End
Begin SCGraphic SCGraphic1
AngleEnd = 45
AngleStart = -90
ArrowSize = 2 'Small
ArrowType = 0 'None
FillColor = &H00808080&
FillColor2 = &H00000000&
FillPattern = 0 'Solid
Height = 975
Index = 5
Left = 2400
LineColor = &H00FF0000&
LinePattern = 0 'Solid
LineWidth = 15
MouseEvents = -1 'True
NumPoints = 6
PaletteSteps = 20
RoundRadius = 0
SelectByInk = 0 'False
ShadowColor = &H00000000&
ShadowDepthX = 0
ShadowDepthY = 0
Shape = 6 'Ngon
ShowOutlineOnly = 0 'False
Top = 3000
Use256Palette = -1 'True
Width = 1455
End
Begin SCGraphic SCGraphic1
AngleEnd = 45
AngleStart = -180
ArrowSize = 2 'Small
ArrowType = 0 'None
FillColor = &H00808080&
FillColor2 = &H00000000&
FillPattern = 0 'Solid
Height = 975
Index = 7
Left = 2400
LineColor = &H00FF0000&
LinePattern = 0 'Solid
LineWidth = 25
MouseEvents = -1 'True
NumPoints = 0
PaletteSteps = 20
RoundRadius = 0
SelectByInk = 0 'False
ShadowColor = &H00000000&
ShadowDepthX = 0
ShadowDepthY = 0
Shape = 4 'Arc
ShowOutlineOnly = 0 'False
Top = 4320
Use256Palette = -1 'True
Width = 1455
End
Begin SCGraphic SCGraphic1
AngleEnd = 45
AngleStart = -90
ArrowSize = 2 'Small
ArrowType = 0 'None
FillColor = &H00808080&
FillColor2 = &H00000000&
FillPattern = 0 'Solid
Height = 975
Index = 3
Left = 2400
LineColor = &H00FF0000&
LinePattern = 0 'Solid
LineWidth = 15
MouseEvents = -1 'True
NumPoints = 4
PaletteSteps = 20
RoundRadius = 0
SelectByInk = 0 'False
ShadowColor = &H00000000&
ShadowDepthX = 0
ShadowDepthY = 0
Shape = 3 'Polygon
ShowOutlineOnly = 0 'False
Top = 1680
Use256Palette = -1 'True
Width = 1455
End
Begin SCGraphic SCGraphic1
AngleEnd = 45
AngleStart = -90
ArrowSize = 2 'Small
ArrowType = 0 'None
FillColor = &H00808080&
FillColor2 = &H00000000&
FillPattern = 0 'Solid
Height = 975
Index = 1
Left = 2400
LineColor = &H00FF0000&
LinePattern = 0 'Solid
LineWidth = 15
MouseEvents = -1 'True
NumPoints = 0
PaletteSteps = 20
RoundRadius = 0
SelectByInk = 0 'False
ShadowColor = &H00000000&
ShadowDepthX = 0
ShadowDepthY = 0
Shape = 1 'Ellipse
ShowOutlineOnly = 0 'False
Top = 240
Use256Palette = -1 'True
Width = 1455
End
Begin SCGraphic SCGraphic1
AngleEnd = 45
AngleStart = -180
ArrowSize = 2 'Small
ArrowType = 0 'None
FillColor = &H00808080&
FillColor2 = &H00000000&
FillPattern = 0 'Solid
Height = 975
Index = 6
Left = 360
LineColor = &H00FF0000&
LinePattern = 0 'Solid
LineWidth = 15
MouseEvents = -1 'True
NumPoints = 0
PaletteSteps = 20
RoundRadius = 0
SelectByInk = 0 'False
ShadowColor = &H00000000&
ShadowDepthX = 0
ShadowDepthY = 0
Shape = 5 'Pie
ShowOutlineOnly = 0 'False
Top = 4320
Use256Palette = -1 'True
Width = 1455
End
Begin SCGraphic SCGraphic1
AngleEnd = 45
AngleStart = -90
ArrowSize = 2 'Small
ArrowType = 0 'None
FillColor = &H00808080&
FillColor2 = &H00000000&
FillPattern = 0 'Solid
Height = 975
Index = 4
Left = 360
LineColor = &H00FF0000&
LinePattern = 0 'Solid
LineWidth = 15
MouseEvents = -1 'True
NumPoints = 4
PaletteSteps = 20
RoundRadius = 0
SelectByInk = 0 'False
ShadowColor = &H00000000&
ShadowDepthX = 0
ShadowDepthY = 0
Shape = 3 'Polygon
ShowOutlineOnly = 0 'False
Top = 3000
Use256Palette = -1 'True
Width = 1455
End
Begin SCGraphic SCGraphic1
AngleEnd = 45
AngleStart = -90
ArrowSize = 3 'Normal
ArrowType = 3 'Both
FillColor = &H00808080&
FillColor2 = &H00000000&
FillPattern = 0 'Solid
Height = 975
Index = 2
Left = 360
LineColor = &H00FF0000&
LinePattern = 0 'Solid
LineWidth = 15
MouseEvents = -1 'True
NumPoints = 4
PaletteSteps = 20
RoundRadius = 0
SelectByInk = 0 'False
ShadowColor = &H00000000&
ShadowDepthX = 0
ShadowDepthY = 0
Shape = 2 'Polyline
ShowOutlineOnly = 0 'False
Top = 1680
Use256Palette = -1 'True
Width = 1455
End
Begin SCGraphic SCGraphic1
AngleEnd = 45
AngleStart = -90
ArrowSize = 2 'Small
ArrowType = 0 'None
FillColor = &H00808080&
FillColor2 = &H00000000&
FillPattern = 0 'Solid
Height = 975
Index = 0
Left = 360
LineColor = &H00FF0000&
LinePattern = 0 'Solid
LineWidth = 15
MouseEvents = -1 'True
NumPoints = 0
PaletteSteps = 20
RoundRadius = 0
SelectByInk = 0 'False
ShadowColor = &H00000000&
ShadowDepthX = 0
ShadowDepthY = 0
Shape = 0 'Rectangle
ShowOutlineOnly = 0 'False
Top = 240
Use256Palette = -1 'True
Width = 1455
End
Begin SCGraphic SCGraphic2
AngleEnd = 45
AngleStart = -90
ArrowSize = 2 'Small
ArrowType = 0 'None
FillColor = &H00FFFFC0&
FillColor2 = &H00800080&
FillPattern = 17 'Graduated Horizontal
Height = 5775
Left = 0
LineColor = &H00FF0000&
LinePattern = 5 'Transparent
LineWidth = 15
MouseEvents = -1 'True
NumPoints = 0
PaletteSteps = 50
RoundRadius = 0
SelectByInk = 0 'False
ShadowColor = &H00000000&
ShadowDepthX = 0
ShadowDepthY = 0
Shape = 0 'Rectangle
ShowOutlineOnly = 0 'False
Top = 0
Use256Palette = -1 'True
Width = 4335
End
End
Option Explicit
Const MAXSAMPLE = 7
Sub Form_Load ()
Dim i, j As Single
' set the initial fill colors for the samples (this could
' have been done at design time instead)
For i = 0 To MAXSAMPLE
SCGraphic1(i).FillPattern = 17 ' graduated horizontal
SCGraphic1(i).FillColor = MAGENTA
SCGraphic1(i).FillColor2 = CYAN
Next i
' set different shadow colors for the open shapes for interest
SCGraphic1(2).ShadowColor = YELLOW
SCGraphic1(7).ShadowColor = YELLOW
' controls 2 through 4 are poly's; set some sample points
' just so we see something interesting
For i = 2 To 4
SCGraphic1(i).NumPoints = 5
SCGraphic1(i).PointX(0) = 100
SCGraphic1(i).PointY(0) = 900
SCGraphic1(i).PointX(1) = 100
SCGraphic1(i).PointY(1) = 100
SCGraphic1(i).PointX(2) = 500
SCGraphic1(i).PointY(2) = 700
SCGraphic1(i).PointX(3) = 900
SCGraphic1(i).PointY(3) = 100
SCGraphic1(i).PointX(4) = 900
SCGraphic1(i).PointY(4) = 900
Next i
' make polyline 4 have some auto curvature points (only the X component needs to be set if it's auto)
SCGraphic1(4).PointXOffsetIn(1) = BEZAUTO
SCGraphic1(4).PointXOffsetIn(2) = BEZAUTO
SCGraphic1(4).PointXOffsetIn(3) = BEZAUTO
SCGraphic1(4).PointXOffsetOut(1) = BEZAUTO
SCGraphic1(4).PointXOffsetOut(2) = BEZAUTO
SCGraphic1(4).PointXOffsetOut(3) = BEZAUTO
End Sub
Sub GradDiag_Click ()
Dim i, j As Single
For i = 0 To MAXSAMPLE
SCGraphic1(i).FillPattern = 19 'graduated down right
Next i
End Sub
Sub GradHorz_Click ()
Dim i, j As Single
For i = 0 To MAXSAMPLE
SCGraphic1(i).FillPattern = 17 'graduated horizontal
Next i
End Sub
Sub GradVert_Click ()
Dim i, j As Single
For i = 0 To MAXSAMPLE
SCGraphic1(i).FillPattern = 16 'graduated vertical
Next i
End Sub
Sub ShadowOff_Click ()
Dim i, j As Single
For i = 0 To MAXSAMPLE
SCGraphic1(i).ShadowDepthX = 0
SCGraphic1(i).ShadowDepthY = 0
Next i
End Sub
Sub ShadowOn_Click ()
Dim i, j As Single
For i = 0 To MAXSAMPLE
SCGraphic1(i).ShadowDepthX = 50 ' assuming units are still twips
SCGraphic1(i).ShadowDepthY = 50
Next i
End Sub
Sub Solid_Click ()
Dim i, j As Single
For i = 0 To MAXSAMPLE
SCGraphic1(i).FillPattern = 0 'solid
Next i
End Sub