home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / protview / demowinx / data.3 / shape / samples / VB / SHAPDEMO / SHAPEDEM.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-10-25  |  8.5 KB  |  283 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "pv Shape-3D Visual Basic Demo"
  4.    ClientHeight    =   6855
  5.    ClientLeft      =   1620
  6.    ClientTop       =   1185
  7.    ClientWidth     =   6540
  8.    Height          =   7260
  9.    Icon            =   "ShapeDem.frx":0000
  10.    Left            =   1560
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   6855
  13.    ScaleWidth      =   6540
  14.    Top             =   840
  15.    Width           =   6660
  16.    Begin VB.CheckBox ShiftVerticalCheck 
  17.       Caption         =   "Shift Vertical"
  18.       Height          =   195
  19.       Left            =   4455
  20.       TabIndex        =   10
  21.       Top             =   4290
  22.       Width           =   1400
  23.    End
  24.    Begin VB.CheckBox ShiftHorizontalCheck 
  25.       Caption         =   "Shift Horizontal"
  26.       Height          =   195
  27.       Left            =   4455
  28.       TabIndex        =   9
  29.       Top             =   3915
  30.       Width           =   1400
  31.    End
  32.    Begin VB.Timer Timer1 
  33.       Interval        =   1000
  34.       Left            =   3660
  35.       Top             =   5250
  36.    End
  37.    Begin VB.CommandButton CloseButton 
  38.       Caption         =   "Close"
  39.       Height          =   405
  40.       Left            =   4710
  41.       TabIndex        =   8
  42.       Top             =   6030
  43.       Width           =   990
  44.    End
  45.    Begin VB.CommandButton StopGoButton 
  46.       Caption         =   "Stop"
  47.       BeginProperty Font 
  48.          name            =   "MS Sans Serif"
  49.          charset         =   0
  50.          weight          =   400
  51.          size            =   18
  52.          underline       =   0   'False
  53.          italic          =   0   'False
  54.          strikethrough   =   0   'False
  55.       EndProperty
  56.       Height          =   600
  57.       Left            =   4365
  58.       TabIndex        =   7
  59.       Top             =   5145
  60.       Width           =   1575
  61.    End
  62.    Begin VB.CheckBox RotateCheck 
  63.       Caption         =   "Rotate"
  64.       Height          =   195
  65.       Left            =   4455
  66.       TabIndex        =   6
  67.       Top             =   3555
  68.       Width           =   1400
  69.    End
  70.    Begin VB.CheckBox TransparentCheck 
  71.       Caption         =   "Transparent"
  72.       Height          =   195
  73.       Left            =   4455
  74.       TabIndex        =   5
  75.       Top             =   3195
  76.       Width           =   1400
  77.    End
  78.    Begin VB.CheckBox SymmetricalCheck 
  79.       Caption         =   "Symmetrical"
  80.       Height          =   195
  81.       Left            =   4455
  82.       TabIndex        =   4
  83.       Top             =   2835
  84.       Width           =   1400
  85.    End
  86.    Begin PVSHAPE3DLib.PVShape3D Shape3D4 
  87.       Height          =   555
  88.       Left            =   4635
  89.       TabIndex        =   14
  90.       Top             =   5955
  91.       Width           =   1140
  92.       _Version        =   65536
  93.       _ExtentX        =   2011
  94.       _ExtentY        =   979
  95.       _StockProps     =   1
  96.       BackColor       =   16711680
  97.       LineWidth       =   2
  98.       Shape           =   2
  99.       ShadowHorizontal=   -1
  100.       ShadowVertical  =   -1
  101.       BackColor       =   16711680
  102.    End
  103.    Begin PVSHAPE3DLib.PVShape3D StopGoShape 
  104.       Height          =   780
  105.       Left            =   4260
  106.       TabIndex        =   13
  107.       Top             =   5040
  108.       Width           =   1755
  109.       _Version        =   65536
  110.       _ExtentX        =   3096
  111.       _ExtentY        =   1376
  112.       _StockProps     =   1
  113.       BackColor       =   255
  114.       LineWidth       =   3
  115.       Shape           =   2
  116.       BackColor       =   255
  117.    End
  118.    Begin PVSHAPE3DLib.PVShape3D Shape3D2 
  119.       Height          =   2265
  120.       Left            =   4170
  121.       TabIndex        =   12
  122.       Top             =   2520
  123.       Width           =   1935
  124.       _Version        =   65536
  125.       _ExtentX        =   3413
  126.       _ExtentY        =   3995
  127.       _StockProps     =   1
  128.       LineWidth       =   3
  129.       Shape           =   2
  130.       Transparent     =   -1  'True
  131.    End
  132.    Begin PVSHAPE3DLib.PVShape3D Shape3D1 
  133.       Height          =   1215
  134.       Left            =   465
  135.       TabIndex        =   11
  136.       Top             =   420
  137.       Width           =   2775
  138.       _Version        =   65536
  139.       _ExtentX        =   4895
  140.       _ExtentY        =   2143
  141.       _StockProps     =   1
  142.       BackColor       =   12632256
  143.       LineWidth       =   4
  144.       ShadowHorizontal=   -1
  145.       ShadowVertical  =   -2
  146.       BackColor       =   12632256
  147.       Transparent     =   -1  'True
  148.    End
  149.    Begin PVSHAPE3DLib.PVShape3D Shape3 
  150.       Height          =   1500
  151.       Left            =   3765
  152.       TabIndex        =   3
  153.       Top             =   435
  154.       Width           =   2190
  155.       _Version        =   65536
  156.       _ExtentX        =   3863
  157.       _ExtentY        =   2646
  158.       _StockProps     =   1
  159.       BackColor       =   65280
  160.       LineWidth       =   2
  161.       Shape           =   7
  162.       ShiftShapeLeft  =   -20
  163.       ShiftShapeUp    =   -7
  164.       ShadowHorizontal=   -7
  165.       ShadowVertical  =   -12
  166.       ShadowColor     =   128
  167.       LineColor       =   16711680
  168.       BackColor       =   65280
  169.    End
  170.    Begin PVSHAPE3DLib.PVShape3D Shape4 
  171.       Height          =   1290
  172.       Left            =   1200
  173.       TabIndex        =   2
  174.       Top             =   660
  175.       Width           =   2505
  176.       _Version        =   65536
  177.       _ExtentX        =   4419
  178.       _ExtentY        =   2275
  179.       _StockProps     =   1
  180.       BackColor       =   16711680
  181.       LineWidth       =   4
  182.       Shape           =   2
  183.       ShiftShapeLeft  =   -25
  184.       ShiftShapeUp    =   -22
  185.       ShadowHorizontal=   3
  186.       ShadowVertical  =   3
  187.       ShadowColor     =   65535
  188.       LineColor       =   255
  189.       BackColor       =   16711680
  190.    End
  191.    Begin PVSHAPE3DLib.PVShape3D Shape2 
  192.       Height          =   2535
  193.       Left            =   465
  194.       TabIndex        =   1
  195.       Top             =   3885
  196.       Width           =   1605
  197.       _Version        =   65536
  198.       _ExtentX        =   2831
  199.       _ExtentY        =   4471
  200.       _StockProps     =   1
  201.       BackColor       =   16711935
  202.       LineWidth       =   2
  203.       ShadowHorizontal=   -2
  204.       ShadowVertical  =   -1
  205.       ShadowColor     =   65535
  206.       LineColor       =   128
  207.       BackColor       =   16711935
  208.    End
  209.    Begin PVSHAPE3DLib.PVShape3D Shape1 
  210.       Height          =   1470
  211.       Left            =   465
  212.       TabIndex        =   0
  213.       Top             =   2205
  214.       Width           =   3015
  215.       _Version        =   65536
  216.       _ExtentX        =   5318
  217.       _ExtentY        =   2593
  218.       _StockProps     =   1
  219.    End
  220. Attribute VB_Name = "Form1"
  221. Attribute VB_Creatable = False
  222. Attribute VB_Exposed = False
  223. Dim intTime As Integer
  224. Private Sub CloseButton_Click()
  225.     End
  226. End Sub
  227. Private Sub RotateCheck_Click()
  228.     Shape1.RotateSide = Not Shape1.RotateSide
  229.     Shape2.RotateSide = Not Shape2.RotateSide
  230.     Shape3.RotateSide = Not Shape3.RotateSide
  231.     Shape4.RotateSide = Not Shape4.RotateSide
  232. End Sub
  233. Private Sub ShiftHorizontalCheck_Click()
  234.     If ShiftHorizontalCheck Then
  235.         Shape1.ShiftShapeLeft = Shape1.Width \ 80
  236.         Shape2.ShiftShapeLeft = Shape2.Width \ 80
  237.     Else
  238.         Shape1.ShiftShapeLeft = 0
  239.         Shape2.ShiftShapeLeft = 0
  240.     End If
  241. End Sub
  242. Private Sub ShiftVerticalCheck_Click()
  243.     If ShiftVerticalCheck Then
  244.         Shape1.ShiftShapeUp = Shape1.Height \ 80
  245.         Shape2.ShiftShapeUp = Shape2.Height \ 80
  246.     Else
  247.         Shape1.ShiftShapeUp = 0
  248.         Shape2.ShiftShapeUp = 0
  249.     End If
  250. End Sub
  251. Private Sub StopGoButton_Click()
  252.     Timer1.Enabled = Not Timer1.Enabled
  253.     If Timer1.Enabled Then
  254.         StopGoButton.Caption = "Stop"
  255.         StopGoShape.BackColor = &HFF&
  256.     Else
  257.         StopGoButton.Caption = "Go"
  258.         StopGoShape.BackColor = &HFF00FF
  259.     End If
  260. End Sub
  261. Private Sub SymmetricalCheck_Click()
  262.     Dim symmetry As Boolean
  263.     symmetry = Shape1.Symmetrical
  264.     Shape1.Symmetrical = Not symmetry
  265.     Shape2.Symmetrical = Not symmetry
  266.     Shape3.Symmetrical = Not symmetry
  267.     Shape4.Symmetrical = Not symmetry
  268.     ShiftHorizontalCheck.Enabled = symmetry
  269.     ShiftVerticalCheck.Enabled = symmetry
  270. End Sub
  271. Private Sub Timer1_Timer()
  272.     intTime = intTime + 1
  273.     If intTime > pvsStar6 Then intTime = pvsEllipse
  274.     Shape1 = intTime
  275.     Shape2 = intTime
  276. End Sub
  277. Private Sub TransparentCheck_Click()
  278.     Shape1.Transparent = TransparentCheck
  279.     Shape2.Transparent = TransparentCheck
  280.     Shape3.Transparent = TransparentCheck
  281.     Shape4.Transparent = TransparentCheck
  282. End Sub
  283.