home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / PVb5.0 / VB / SAMPLES / PGUIDE / BLANKER / BLANKER.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1997-01-13  |  22.1 KB  |  724 lines

  1. VERSION 5.00
  2. Begin VB.Form DemoForm 
  3.    BackColor       =   &H00000000&
  4.    Caption         =   "
  5.    ClientHeight    =   4380
  6.    ClientLeft      =   960
  7.    ClientTop       =   2535
  8.    ClientWidth     =   7470
  9.    BeginProperty Font 
  10.       Name            =   "MS Sans Serif"
  11.       Size            =   8.25
  12.       Charset         =   0
  13.       Weight          =   700
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    ForeColor       =   &H00000000&
  19.    Icon            =   "BLANKER.frx":0000
  20.    LinkMode        =   1  'Source
  21.    LinkTopic       =   "Form1"
  22.    PaletteMode     =   1  'UseZOrder
  23.    ScaleHeight     =   4380
  24.    ScaleWidth      =   7470
  25.    WhatsThisHelp   =   -1  'True
  26.    Begin VB.Timer Timer1 
  27.       Interval        =   1
  28.       Left            =   6960
  29.       Top             =   120
  30.    End
  31.    Begin VB.CommandButton cmdStartStop 
  32.       BackColor       =   &H00000000&
  33.       Caption         =   "
  34.       Default         =   -1  'True
  35.       BeginProperty Font 
  36.          Name            =   "
  37.          Size            =   9
  38.          Charset         =   134
  39.          Weight          =   700
  40.          Underline       =   0   'False
  41.          Italic          =   0   'False
  42.          Strikethrough   =   0   'False
  43.       EndProperty
  44.       Height          =   390
  45.       Left            =   240
  46.       TabIndex        =   0
  47.       Top             =   120
  48.       Width           =   1830
  49.    End
  50.    Begin VB.PictureBox picBall 
  51.       AutoSize        =   -1  'True
  52.       BackColor       =   &H00000000&
  53.       BorderStyle     =   0  'None
  54.       ForeColor       =   &H00FFFFFF&
  55.       Height          =   480
  56.       Left            =   1800
  57.       Picture         =   "BLANKER.frx":030A
  58.       ScaleHeight     =   480
  59.       ScaleWidth      =   480
  60.       TabIndex        =   1
  61.       Top             =   720
  62.       Visible         =   0   'False
  63.       Width           =   480
  64.    End
  65.    Begin VB.Image imgMoon 
  66.       Height          =   480
  67.       Index           =   8
  68.       Left            =   6360
  69.       Picture         =   "BLANKER.frx":0614
  70.       Top             =   3720
  71.       Visible         =   0   'False
  72.       Width           =   480
  73.    End
  74.    Begin VB.Line linLineCtl 
  75.       BorderColor     =   &H00FF0000&
  76.       BorderWidth     =   5
  77.       Visible         =   0   'False
  78.       X1              =   240
  79.       X2              =   4080
  80.       Y1              =   2760
  81.       Y2              =   2760
  82.    End
  83.    Begin VB.Image imgMoon 
  84.       Height          =   480
  85.       Index           =   7
  86.       Left            =   5760
  87.       Picture         =   "BLANKER.frx":091E
  88.       Top             =   3720
  89.       Visible         =   0   'False
  90.       Width           =   480
  91.    End
  92.    Begin VB.Image imgMoon 
  93.       Height          =   480
  94.       Index           =   6
  95.       Left            =   5160
  96.       Picture         =   "BLANKER.frx":0C28
  97.       Top             =   3720
  98.       Visible         =   0   'False
  99.       Width           =   480
  100.    End
  101.    Begin VB.Image imgMoon 
  102.       Height          =   480
  103.       Index           =   5
  104.       Left            =   4560
  105.       Picture         =   "BLANKER.frx":0F32
  106.       Top             =   3720
  107.       Visible         =   0   'False
  108.       Width           =   480
  109.    End
  110.    Begin VB.Image imgMoon 
  111.       Height          =   480
  112.       Index           =   4
  113.       Left            =   3960
  114.       Picture         =   "BLANKER.frx":123C
  115.       Top             =   3720
  116.       Visible         =   0   'False
  117.       Width           =   480
  118.    End
  119.    Begin VB.Image imgMoon 
  120.       Height          =   480
  121.       Index           =   3
  122.       Left            =   3360
  123.       Picture         =   "BLANKER.frx":1546
  124.       Top             =   3720
  125.       Visible         =   0   'False
  126.       Width           =   480
  127.    End
  128.    Begin VB.Image imgMoon 
  129.       Height          =   480
  130.       Index           =   2
  131.       Left            =   2760
  132.       Picture         =   "BLANKER.frx":1850
  133.       Top             =   3720
  134.       Visible         =   0   'False
  135.       Width           =   480
  136.    End
  137.    Begin VB.Image imgMoon 
  138.       Height          =   480
  139.       Index           =   1
  140.       Left            =   2160
  141.       Picture         =   "BLANKER.frx":1B5A
  142.       Top             =   3720
  143.       Visible         =   0   'False
  144.       Width           =   480
  145.    End
  146.    Begin VB.Image imgMoon 
  147.       Height          =   480
  148.       Index           =   0
  149.       Left            =   1560
  150.       Picture         =   "BLANKER.frx":1E64
  151.       Top             =   3720
  152.       Visible         =   0   'False
  153.       Width           =   480
  154.    End
  155.    Begin VB.Shape shpClone 
  156.       BackColor       =   &H00000000&
  157.       BackStyle       =   1  'Opaque
  158.       BorderColor     =   &H00FF0000&
  159.       FillColor       =   &H000000FF&
  160.       Height          =   1215
  161.       Index           =   0
  162.       Left            =   240
  163.       Top             =   720
  164.       Visible         =   0   'False
  165.       Width           =   1410
  166.    End
  167.    Begin VB.Shape Shape1 
  168.       Height          =   15
  169.       Left            =   960
  170.       Top             =   1080
  171.       Width           =   15
  172.    End
  173.    Begin VB.Menu mnuOption 
  174.       Caption         =   "
  175. (&O)"
  176.       Begin VB.Menu mnuLineCtlDemo 
  177.          Caption         =   "
  178. (&J)"
  179.          Checked         =   -1  'True
  180.       End
  181.       Begin VB.Menu mnuCtlMoveDemo 
  182.          Caption         =   "
  183. (&B)"
  184.       End
  185.       Begin VB.Menu mnuImageDemo 
  186.          Caption         =   "
  187. (&S)"
  188.       End
  189.       Begin VB.Menu mnuShapeDemo 
  190.          Caption         =   "
  191. (&M)"
  192.       End
  193.       Begin VB.Menu mnuPSetDemo 
  194.          Caption         =   "
  195. (&C)"
  196.       End
  197.       Begin VB.Menu mnuLineDemo 
  198.          Caption         =   "
  199. (&R)"
  200.       End
  201.       Begin VB.Menu mnuCircleDemo 
  202.          Caption         =   "
  203. (&W)"
  204.       End
  205.       Begin VB.Menu mnuScaleDemo 
  206.          Caption         =   "
  207. (&L)"
  208.       End
  209.       Begin VB.Menu sep1 
  210.          Caption         =   "-"
  211.       End
  212.       Begin VB.Menu mnuExit 
  213.          Caption         =   "
  214. (&X)"
  215.       End
  216.    End
  217. Attribute VB_Name = "DemoForm"
  218. Attribute VB_GlobalNameSpace = False
  219. Attribute VB_Creatable = False
  220. Attribute VB_PredeclaredId = True
  221. Attribute VB_Exposed = False
  222. Option Explicit
  223. Dim FrameNum
  224. Dim XPos
  225. Dim YPos
  226.  Do Loops 
  227. Dim DoFlag
  228. Dim Motion
  229. Dim R
  230. Dim G
  231. Dim B
  232. Private Sub CircleDemo()
  233.     '
  234.     Dim Radius
  235.     ' 
  236.     R = 255 * Rnd
  237.     G = 255 * Rnd
  238.     B = 255 * Rnd
  239.     ' 
  240.     XPos = ScaleWidth / 2
  241.     YPos = ScaleHeight / 2
  242.     ' 
  243.     Radius = ((YPos * 0.9) + 1) * Rnd
  244.     '
  245.     Circle (XPos, YPos), Radius, RGB(R, G, B)
  246. End Sub
  247. Private Sub cmdStartStop_Click()
  248. Dim UnClone
  249. Dim MakeClone
  250. Dim X1
  251. Dim Y1
  252.     Select Case DoFlag
  253.         Case True
  254.             cmdStartStop.Caption = "
  255.             DoFlag = False
  256.             mnuOption.Enabled = True
  257.             If mnuCtlMoveDemo.Checked = True Then
  258.                 ' 
  259.                 picBall.Visible = False
  260.             ElseIf mnuLineDemo.Checked = True Then
  261.                 ' 
  262.                 Cls
  263.             ElseIf mnuShapeDemo.Checked = True Then
  264.                 ' 
  265.                 For UnClone = 1 To 20
  266.                     Unload shpClone(UnClone)
  267.                 Next UnClone
  268.                 ' 
  269.                 DemoForm.BackColor = QBColor(0)
  270.                 ' 
  271.                 Refresh
  272.             ElseIf mnuPSetDemo.Checked = True Then
  273.                 ' 
  274.                 Cls
  275.             ElseIf mnuLineCtlDemo.Checked = True Then
  276.                 ' 
  277.  Line 
  278.                 linLineCtl.Visible = False
  279.                 ' 
  280.  Line 
  281.                 Cls
  282.             ElseIf mnuImageDemo.Checked = True Then
  283.                 ' 
  284.                 imgMoon(0).Visible = False
  285.             ElseIf mnuScaleDemo.Checked = True Then
  286.                 ' 
  287.                 Cls
  288.                 ' 
  289.                 Scale
  290.             ElseIf mnuCircleDemo.Checked = True Then
  291.                 ' 
  292.                 Cls
  293.             End If
  294.         Case False
  295.             cmdStartStop.Caption = "
  296.             DoFlag = True
  297.             mnuOption.Enabled = False
  298.             If mnuCtlMoveDemo.Checked = True Then
  299.                 ' 
  300. picture box 
  301.                 picBall.Visible = True
  302.                 ' 
  303.  motion
  304.                 ' motion
  305.  Do Loop 
  306.                 Motion = Int(4 * Rnd + 1)
  307.             ElseIf mnuLineDemo.Checked = True Then
  308.                 ' 
  309.                 Randomize
  310.                 ' 
  311.                 DrawWidth = 2
  312.                 ' 
  313.                 X1 = Int(DemoForm.Width * Rnd + 1)
  314.                 Y1 = Int(DemoForm.Height * Rnd + 1)
  315.             ElseIf mnuShapeDemo.Checked = True Then
  316.                 ' 
  317.                 For MakeClone = 1 To 20
  318.                     Load shpClone(MakeClone)
  319.                 Next MakeClone
  320.             ElseIf mnuPSetDemo.Checked = True Then
  321.                 ' 
  322.                 DrawWidth = 5
  323.             ElseIf mnuLineCtlDemo.Checked = True Then
  324.                 ' 
  325.                 linLineCtl.Visible = True
  326.                 ' 
  327.                 DrawWidth = 7
  328.             ElseIf mnuImageDemo.Checked = True Then
  329.                 ' 
  330. image 
  331.                 imgMoon(0).Visible = True
  332.                 ' 
  333.                 FrameNum = 0
  334.                 '
  335.  motion
  336.                 ' motion
  337.  Do Loop 
  338.                 Motion = Int(4 * Rnd + 1)
  339.             ElseIf mnuScaleDemo.Checked = True Then
  340.                 ' 
  341.                 Randomize
  342.                 ' 
  343.                 DrawWidth = 1
  344.                 ' 
  345.                 ' 
  346.  = 1,
  347.                 ScaleLeft = 1
  348.                 ' 
  349.                 ScaleTop = 10
  350.                 ' 
  351.                 ScaleWidth = Int(13 * Rnd + 3)
  352.                 ' 
  353.                 ' Y-
  354.                 ScaleHeight = -10
  355.             ElseIf mnuCircleDemo.Checked = True Then
  356.                 ' 
  357.                 DrawWidth = 1
  358.                 ' 
  359.                 DrawStyle = vbDash
  360.                 ' 
  361.  XOR pen
  362.  pen 
  363.                 DrawMode = vbXorPen
  364.             End If
  365.     End Select
  366. End Sub
  367. Private Sub CtlMoveDemo()
  368.     Select Case Motion
  369.     Case 1
  370.         ' 
  371.         picBall.Move picBall.Left - 20, picBall.Top - 20
  372.         ' 
  373.         If picBall.Left <= 0 Then
  374.             Motion = 2
  375.         ' 
  376.         ElseIf picBall.Top <= 0 Then
  377.             Motion = 4
  378.         End If
  379.     Case 2
  380.         ' 
  381.         picBall.Move picBall.Left + 20, picBall.Top - 20
  382.         ' 
  383.         ' 
  384.         If picBall.Left >= (DemoForm.Width - picBall.Width) Then
  385.             Motion = 1
  386.         ' 
  387.         ElseIf picBall.Top <= 0 Then
  388.             Motion = 3
  389.         End If
  390.     Case 3
  391.         ' 
  392.         picBall.Move picBall.Left + 20, picBall.Top + 20
  393.         ' 
  394.         If picBall.Left >= (DemoForm.Width - picBall.Width) Then
  395.             Motion = 4
  396.         ' 
  397.         ' 
  398.         ElseIf picBall.Top >= (DemoForm.Height - picBall.Height) - 680 Then
  399.             Motion = 2
  400.         End If
  401.     Case 4
  402.         ' 
  403.         picBall.Move picBall.Left - 20, picBall.Top + 20
  404.         ' 
  405.         If picBall.Left <= 0 Then
  406.             Motion = 3
  407.         ' 
  408.         ElseIf picBall.Top >= (DemoForm.Height - picBall.Height) - 680 Then
  409.             Motion = 1
  410.         End If
  411.     End Select
  412. End Sub
  413. Private Sub Delay()
  414.     Dim Start
  415.     Dim Check
  416.     Start = Timer
  417.     Do Until Check >= Start + 0.15
  418.         Check = Timer
  419.     Loop
  420. End Sub
  421. Private Sub Form_Load()
  422.     DoFlag = False
  423. End Sub
  424. Private Sub Form_Resize()
  425.     If mnuScaleDemo.Checked = True And DemoForm.WindowState = 0 Then
  426.         ' 
  427.         Randomize
  428.         ' 
  429.         DrawWidth = 1
  430.         ' 
  431.         ' 
  432.         ' 
  433.         ScaleLeft = 1
  434.         ' 
  435.         ScaleTop = 10
  436.         ' 
  437.         ' 
  438.         ScaleWidth = Int(13 * Rnd + 3)
  439.         ' 
  440.         ' 
  441.         ScaleHeight = -10
  442.     End If
  443. End Sub
  444. Private Sub Form_Unload(Cancel As Integer)
  445.     End
  446. End Sub
  447. Private Sub ImageDemo()
  448.     Select Case Motion
  449.     Case 1
  450.         '
  451.  100 
  452.         imgMoon(0).Move imgMoon(0).Left - 100, imgMoon(0).Top - 100
  453.         ' 
  454.         IncrFrame
  455.         ' 
  456.         If imgMoon(0).Left <= 0 Then
  457.             Motion = 2
  458.         ' 
  459.         ElseIf imgMoon(0).Top <= 0 Then
  460.             Motion = 4
  461.         End If
  462.     Case 2
  463.         '
  464.  100 
  465.         imgMoon(0).Move imgMoon(0).Left + 100, imgMoon(0).Top - 100
  466.         ' 
  467.         IncrFrame
  468.         ' 
  469.         ' 
  470.         If imgMoon(0).Left >= (DemoForm.Width - imgMoon(0).Width) Then
  471.             Motion = 1
  472.         ' 
  473.         ElseIf imgMoon(0).Top <= 0 Then
  474.             Motion = 3
  475.         End If
  476.     Case 3
  477.         ' 
  478.  100 
  479.         imgMoon(0).Move imgMoon(0).Left + 100, imgMoon(0).Top + 100
  480.         ' 
  481.         IncrFrame
  482.         ' 
  483.         If imgMoon(0).Left >= (DemoForm.Width - imgMoon(0).Width) Then
  484.             Motion = 4
  485.         ' 
  486.         ' 
  487.         ' 
  488.         ElseIf imgMoon(0).Top >= (DemoForm.Height - imgMoon(0).Height) - 680 Then
  489.             Motion = 2
  490.         End If
  491.     Case 4
  492.         ' 
  493.         imgMoon(0).Move imgMoon(0).Left - 100, imgMoon(0).Top + 100
  494.         ' 
  495.         IncrFrame
  496.         ' 
  497.         If imgMoon(0).Left <= 0 Then
  498.             Motion = 3
  499.         ' 
  500.         ElseIf imgMoon(0).Top >= (DemoForm.Height - imgMoon(0).Height) - 680 Then
  501.             Motion = 1
  502.         End If
  503.     End Select
  504. End Sub
  505. Private Sub IncrFrame()
  506.     ' 
  507.     FrameNum = FrameNum + 1
  508.     ' 
  509.     If FrameNum > 8 Then
  510.         FrameNum = 1
  511.     End If
  512.     ' 
  513. IMAGE
  514.     imgMoon(0).Picture = imgMoon(FrameNum).Picture
  515.     ' 
  516.     Me.Refresh
  517.     Delay
  518. End Sub
  519. Private Sub LineCtlDemo()
  520.     ' 
  521.     linLineCtl.X1 = Int(DemoForm.Width * Rnd)
  522.     linLineCtl.Y1 = Int(DemoForm.Height * Rnd)
  523.     '
  524.     linLineCtl.X2 = Int(DemoForm.Width * Rnd)
  525.     linLineCtl.Y2 = Int(DemoForm.Height * Rnd)
  526.     ' 
  527.     Cls
  528.     '
  529.     Delay
  530. End Sub
  531. Private Sub LineDemo()
  532.     ' 
  533.     Dim X2
  534.     Dim Y2
  535.     ' 
  536.  RGB 
  537.     R = 255 * Rnd
  538.     G = 255 * Rnd
  539.     B = 255 * Rnd
  540.     ' 
  541. (line)
  542.     X2 = Int(DemoForm.Width * Rnd + 1)
  543.     Y2 = Int(DemoForm.Height * Rnd + 1)
  544.     ' 
  545.     Line -(X2, Y2), RGB(R, G, B)
  546. End Sub
  547. Private Sub mnuCircleDemo_Click()
  548.     Cls
  549.     mnuCtlMoveDemo.Checked = False
  550.     mnuLineDemo.Checked = False
  551.     mnuShapeDemo.Checked = False
  552.     mnuPSetDemo.Checked = False
  553.     mnuLineCtlDemo.Checked = False
  554.     mnuImageDemo.Checked = False
  555.     mnuScaleDemo.Checked = False
  556.     mnuCircleDemo.Checked = True
  557. End Sub
  558. Private Sub mnuCtlMoveDemo_Click()
  559.     Cls
  560.     mnuCtlMoveDemo.Checked = True
  561.     mnuLineDemo.Checked = False
  562.     mnuShapeDemo.Checked = False
  563.     mnuPSetDemo.Checked = False
  564.     mnuLineCtlDemo.Checked = False
  565.     mnuImageDemo.Checked = False
  566.     mnuScaleDemo.Checked = False
  567.     mnuCircleDemo.Checked = False
  568. End Sub
  569. Private Sub mnuExit_Click()
  570.     End
  571. End Sub
  572. Private Sub mnuImageDemo_Click()
  573.     Cls
  574.     mnuCtlMoveDemo.Checked = False
  575.     mnuLineDemo.Checked = False
  576.     mnuShapeDemo.Checked = False
  577.     mnuPSetDemo.Checked = False
  578.     mnuLineCtlDemo.Checked = False
  579.     mnuImageDemo.Checked = True
  580.     mnuScaleDemo.Checked = False
  581.     mnuCircleDemo.Checked = False
  582. End Sub
  583. Private Sub mnuLineCtlDemo_Click()
  584.     Cls
  585.     mnuCtlMoveDemo.Checked = False
  586.     mnuLineDemo.Checked = False
  587.     mnuShapeDemo.Checked = False
  588.     mnuPSetDemo.Checked = False
  589.     mnuLineCtlDemo.Checked = True
  590.     mnuImageDemo.Checked = False
  591.     mnuScaleDemo.Checked = False
  592.     mnuCircleDemo.Checked = False
  593. End Sub
  594. Private Sub mnuLineDemo_Click()
  595.     Cls
  596.     mnuCtlMoveDemo.Checked = False
  597.     mnuLineDemo.Checked = True
  598.     mnuShapeDemo.Checked = False
  599.     mnuPSetDemo.Checked = False
  600.     mnuLineCtlDemo.Checked = False
  601.     mnuImageDemo.Checked = False
  602.     mnuScaleDemo.Checked = False
  603.     mnuCircleDemo.Checked = False
  604. End Sub
  605. Private Sub mnuPSetDemo_Click()
  606.     Cls
  607.     mnuCtlMoveDemo.Checked = False
  608.     mnuLineDemo.Checked = False
  609.     mnuShapeDemo.Checked = False
  610.     mnuPSetDemo.Checked = True
  611.     mnuLineCtlDemo.Checked = False
  612.     mnuImageDemo.Checked = False
  613.     mnuScaleDemo.Checked = False
  614.     mnuCircleDemo.Checked = False
  615. End Sub
  616. Private Sub mnuScaleDemo_Click()
  617.     Cls
  618.     mnuCtlMoveDemo.Checked = False
  619.     mnuLineDemo.Checked = False
  620.     mnuShapeDemo.Checked = False
  621.     mnuPSetDemo.Checked = False
  622.     mnuLineCtlDemo.Checked = False
  623.     mnuImageDemo.Checked = False
  624.     mnuScaleDemo.Checked = True
  625.     mnuCircleDemo.Checked = False
  626. End Sub
  627. Private Sub mnuShapeDemo_Click()
  628.     Cls
  629.     mnuCtlMoveDemo.Checked = False
  630.     mnuLineDemo.Checked = False
  631.     mnuShapeDemo.Checked = True
  632.     mnuPSetDemo.Checked = False
  633.     mnuLineCtlDemo.Checked = False
  634.     mnuImageDemo.Checked = False
  635.     mnuScaleDemo.Checked = False
  636.     mnuCircleDemo.Checked = False
  637. End Sub
  638. Private Sub PSetDemo()
  639.     ' 
  640.  RGB 
  641.     R = 255 * Rnd
  642.     G = 255 * Rnd
  643.     B = 255 * Rnd
  644.     ' XPos 
  645.     XPos = Rnd * ScaleWidth
  646.     ' YPos 
  647.     YPos = Rnd * ScaleHeight
  648.     ' 
  649.  XPos, YPos 
  650.     PSet (XPos, YPos), RGB(R, G, B)
  651. End Sub
  652. Private Sub ScaleDemo()
  653.     ' 
  654.     Dim Box
  655.     ' 
  656.     For Box = 1 To ScaleWidth
  657.         ' 
  658.  RGB 
  659.         R = 255 * Rnd
  660.         G = 255 * Rnd
  661.         B = 255 * Rnd
  662.         ' 
  663.  Line 
  664. ScaleWidth
  665.         ' 
  666.         Line (Box, 0)-Step(1, (Int(11 * Rnd))), RGB(R, G, B), BF
  667.     Next Box
  668.     ' 
  669.     Delay
  670. End Sub
  671. Private Sub ShapeDemo()
  672.     ' 
  673.     Dim CloneID
  674.     ' 
  675.  RGB 
  676.     R = 255 * Rnd
  677.     G = 255 * Rnd
  678.     B = 255 * Rnd
  679.     ' 
  680.     DemoForm.BackColor = RGB(R, G, B)
  681.     ' 
  682.     CloneID = Int(20 * Rnd + 1)
  683.     ' 
  684.     XPos = Int(DemoForm.Width * Rnd + 1)
  685.     YPos = Int(DemoForm.Height * Rnd + 1)
  686.     ' 
  687.     shpClone(CloneID).Shape = Int(6 * Rnd)
  688.     ' 
  689.  500 
  690.  2500 
  691.     shpClone(CloneID).Height = Int(2501 * Rnd + 500)
  692.     shpClone(CloneID).Width = Int(2501 * Rnd + 500)
  693.     ' 
  694. DrawMode
  695.     shpClone(CloneID).BackColor = QBColor(Int(15 * Rnd))
  696.     shpClone(CloneID).DrawMode = Int(16 * Rnd + 1)
  697.     ' 
  698.  XPos, YPos
  699.     shpClone(CloneID).Move XPos, YPos
  700.     ' 
  701.     shpClone(CloneID).Visible = True
  702.     ' 
  703.     Delay
  704. End Sub
  705. Private Sub Timer1_Timer()
  706.     If mnuCtlMoveDemo.Checked And DoFlag = True Then
  707.         CtlMoveDemo
  708.     ElseIf mnuLineDemo.Checked And DoFlag = True Then
  709.         LineDemo
  710.     ElseIf mnuShapeDemo.Checked And DoFlag = True Then
  711.         ShapeDemo
  712.     ElseIf mnuPSetDemo.Checked And DoFlag = True Then
  713.         PSetDemo
  714.     ElseIf mnuLineCtlDemo.Checked And DoFlag = True Then
  715.         LineCtlDemo
  716.     ElseIf mnuImageDemo.Checked And DoFlag = True Then
  717.         ImageDemo
  718.     ElseIf mnuScaleDemo.Checked And DoFlag = True Then
  719.         ScaleDemo
  720.     ElseIf mnuCircleDemo.Checked And DoFlag = True Then
  721.         CircleDemo
  722.     End If
  723. End Sub
  724.