home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / protview / demowinx / data.2 / line / samples / VB / LINEDEMO / LINEDEMO.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-10-25  |  12.5 KB  |  442 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "pv Line 3D Visual Basic Demo"
  4.    ClientHeight    =   6630
  5.    ClientLeft      =   1500
  6.    ClientTop       =   1125
  7.    ClientWidth     =   6360
  8.    Height          =   7035
  9.    Icon            =   "LineDemo.frx":0000
  10.    Left            =   1440
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   6630
  13.    ScaleWidth      =   6360
  14.    Top             =   780
  15.    Width           =   6480
  16.    Begin VB.CommandButton CloseButton 
  17.       Caption         =   "Close"
  18.       Height          =   390
  19.       Left            =   4125
  20.       TabIndex        =   19
  21.       Top             =   5640
  22.       Width           =   1020
  23.    End
  24.    Begin VB.OptionButton DashDotDotOption 
  25.       Caption         =   "Dash Dot Dot"
  26.       Height          =   195
  27.       Left            =   4005
  28.       TabIndex        =   18
  29.       Top             =   4740
  30.       Width           =   1515
  31.    End
  32.    Begin VB.OptionButton DashDotOption 
  33.       Caption         =   "Dash Dot"
  34.       Height          =   225
  35.       Left            =   4005
  36.       TabIndex        =   17
  37.       Top             =   4425
  38.       Width           =   1380
  39.    End
  40.    Begin VB.OptionButton DotOption 
  41.       Caption         =   "Dot"
  42.       Height          =   270
  43.       Left            =   4005
  44.       TabIndex        =   16
  45.       Top             =   4095
  46.       Width           =   1350
  47.    End
  48.    Begin VB.OptionButton DashOption 
  49.       Caption         =   "Dash"
  50.       Height          =   285
  51.       Left            =   4005
  52.       TabIndex        =   15
  53.       Top             =   3780
  54.       Width           =   1290
  55.    End
  56.    Begin VB.OptionButton SolidOption 
  57.       Caption         =   "Solid"
  58.       Height          =   240
  59.       Left            =   4005
  60.       TabIndex        =   14
  61.       Top             =   3510
  62.       Width           =   1035
  63.    End
  64.    Begin VB.Timer Timer1 
  65.       Interval        =   100
  66.       Left            =   2730
  67.       Top             =   1050
  68.    End
  69.    Begin PVLINE3DLib.PVLine3D Line3D12 
  70.       Height          =   180
  71.       Left            =   185
  72.       TabIndex        =   27
  73.       Top             =   6360
  74.       Width           =   6000
  75.       _Version        =   65536
  76.       _ExtentX        =   10583
  77.       _ExtentY        =   318
  78.       _StockProps     =   8
  79.       ForeColor       =   8421504
  80.       LineWidth       =   3
  81.       ShadowColor     =   65535
  82.    End
  83.    Begin PVLINE3DLib.PVLine3D Line3D10 
  84.       Height          =   6255
  85.       Left            =   6060
  86.       TabIndex        =   25
  87.       Top             =   180
  88.       Width           =   195
  89.       _Version        =   65536
  90.       _ExtentX        =   344
  91.       _ExtentY        =   11033
  92.       _StockProps     =   8
  93.       ForeColor       =   8421504
  94.       LineOrientation =   1
  95.       LineWidth       =   3
  96.       ShadowColor     =   65535
  97.    End
  98.    Begin PVLINE3DLib.PVLine3D Line3D11 
  99.       Height          =   150
  100.       Left            =   180
  101.       TabIndex        =   26
  102.       Top             =   135
  103.       Width           =   5985
  104.       _Version        =   65536
  105.       _ExtentX        =   10557
  106.       _ExtentY        =   265
  107.       _StockProps     =   8
  108.       ForeColor       =   8421504
  109.       LineWidth       =   3
  110.       ShadowColor     =   65535
  111.    End
  112.    Begin PVLINE3DLib.PVLine3D Line3D9 
  113.       Height          =   6285
  114.       Left            =   120
  115.       TabIndex        =   24
  116.       Top             =   180
  117.       Width           =   180
  118.       _Version        =   65536
  119.       _ExtentX        =   318
  120.       _ExtentY        =   11086
  121.       _StockProps     =   8
  122.       ForeColor       =   8421504
  123.       LineOrientation =   1
  124.       LineWidth       =   3
  125.       ShadowColor     =   65535
  126.    End
  127.    Begin PVLINE3DLib.PVLine3D Line3D5 
  128.       Height          =   555
  129.       Left            =   3975
  130.       TabIndex        =   20
  131.       Top             =   5550
  132.       Width           =   195
  133.       _Version        =   65536
  134.       _ExtentX        =   344
  135.       _ExtentY        =   979
  136.       _StockProps     =   8
  137.       ForeColor       =   255
  138.       LineOrientation =   1
  139.       LineWidth       =   3
  140.       ShadowColor     =   65535
  141.    End
  142.    Begin PVLINE3DLib.PVLine3D Line3D8 
  143.       Height          =   540
  144.       Left            =   5025
  145.       TabIndex        =   23
  146.       Top             =   5565
  147.       Width           =   285
  148.       _Version        =   65536
  149.       _ExtentX        =   503
  150.       _ExtentY        =   953
  151.       _StockProps     =   8
  152.       ForeColor       =   255
  153.       LineOrientation =   1
  154.       LineWidth       =   3
  155.       ShadowHorizontal=   -2
  156.       ShadowVertical  =   -1
  157.       ShadowColor     =   128
  158.    End
  159.    Begin PVLINE3DLib.PVLine3D Line3D7 
  160.       Height          =   195
  161.       Left            =   4050
  162.       TabIndex        =   22
  163.       Top             =   5955
  164.       Width           =   1170
  165.       _Version        =   65536
  166.       _ExtentX        =   2064
  167.       _ExtentY        =   344
  168.       _StockProps     =   8
  169.       ForeColor       =   255
  170.       LineWidth       =   3
  171.       ShadowHorizontal=   -1
  172.       ShadowVertical  =   -2
  173.       ShadowColor     =   128
  174.    End
  175.    Begin PVLINE3DLib.PVLine3D Line3D6 
  176.       Height          =   195
  177.       Left            =   4035
  178.       TabIndex        =   21
  179.       Top             =   5490
  180.       Width           =   1185
  181.       _Version        =   65536
  182.       _ExtentX        =   2090
  183.       _ExtentY        =   344
  184.       _StockProps     =   8
  185.       ForeColor       =   255
  186.       LineWidth       =   3
  187.       ShadowColor     =   65535
  188.    End
  189.    Begin PVLINE3DLib.PVLine3D Line10 
  190.       Height          =   2280
  191.       Left            =   3765
  192.       TabIndex        =   13
  193.       Top             =   525
  194.       Width           =   1845
  195.       _Version        =   65536
  196.       _ExtentX        =   3254
  197.       _ExtentY        =   4022
  198.       _StockProps     =   8
  199.       LineOrientation =   1
  200.       LineWidth       =   100
  201.    End
  202.    Begin PVLINE3DLib.PVLine3D Line9 
  203.       Height          =   990
  204.       Left            =   525
  205.       TabIndex        =   12
  206.       Top             =   4980
  207.       Width           =   3030
  208.       _Version        =   65536
  209.       _ExtentX        =   5345
  210.       _ExtentY        =   1746
  211.       _StockProps     =   8
  212.       ForeColor       =   16776960
  213.       LineOrientation =   3
  214.       LineWidth       =   36
  215.       WidthToRectShape=   -1  'True
  216.       ShadowHorizontal=   2
  217.       ShadowVertical  =   -3
  218.       ShadowColor     =   16711680
  219.    End
  220.    Begin PVLINE3DLib.PVLine3D Line8 
  221.       Height          =   1200
  222.       Left            =   360
  223.       TabIndex        =   11
  224.       Top             =   3420
  225.       Width           =   2730
  226.       _Version        =   65536
  227.       _ExtentX        =   4815
  228.       _ExtentY        =   2117
  229.       _StockProps     =   8
  230.       ForeColor       =   65280
  231.       LineOrientation =   2
  232.       LineWidth       =   22
  233.       ShadowHorizontal=   -11
  234.       ShadowVertical  =   -31
  235.       ShadowColor     =   32896
  236.    End
  237.    Begin PVLINE3DLib.PVLine3D Line7 
  238.       Height          =   600
  239.       Left            =   450
  240.       TabIndex        =   10
  241.       Top             =   2475
  242.       Width           =   2535
  243.       _Version        =   65536
  244.       _ExtentX        =   4471
  245.       _ExtentY        =   1058
  246.       _StockProps     =   8
  247.       ForeColor       =   255
  248.       LineWidth       =   22
  249.       ShadowVertical  =   2
  250.       ShadowColor     =   65535
  251.    End
  252.    Begin PVLINE3DLib.PVLine3D Line2 
  253.       Height          =   1500
  254.       Left            =   585
  255.       TabIndex        =   5
  256.       Top             =   540
  257.       Width           =   1500
  258.       _Version        =   65536
  259.       _ExtentX        =   2646
  260.       _ExtentY        =   2646
  261.       _StockProps     =   8
  262.       LineOrientation =   2
  263.       ShadowHorizontal=   -1
  264.    End
  265.    Begin PVLINE3DLib.PVLine3D Line3 
  266.       Height          =   1585
  267.       Left            =   2100
  268.       TabIndex        =   9
  269.       Top             =   500
  270.       Width           =   45
  271.       _Version        =   65536
  272.       _ExtentX        =   79
  273.       _ExtentY        =   2805
  274.       _StockProps     =   8
  275.       LineOrientation =   1
  276.    End
  277.    Begin PVLINE3DLib.PVLine3D Line4 
  278.       Height          =   75
  279.       Left            =   545
  280.       TabIndex        =   7
  281.       Top             =   465
  282.       Width           =   1585
  283.       _Version        =   65536
  284.       _ExtentX        =   2805
  285.       _ExtentY        =   132
  286.       _StockProps     =   8
  287.    End
  288.    Begin PVLINE3DLib.PVLine3D Line5 
  289.       Height          =   60
  290.       Left            =   555
  291.       TabIndex        =   6
  292.       Top             =   2055
  293.       Width           =   1575
  294.       _Version        =   65536
  295.       _ExtentX        =   2778
  296.       _ExtentY        =   106
  297.       _StockProps     =   8
  298.    End
  299.    Begin PVLINE3DLib.PVLine3D Line1 
  300.       Height          =   1500
  301.       Left            =   585
  302.       TabIndex        =   4
  303.       Top             =   540
  304.       Width           =   1500
  305.       _Version        =   65536
  306.       _ExtentX        =   2646
  307.       _ExtentY        =   2646
  308.       _StockProps     =   8
  309.       LineOrientation =   3
  310.    End
  311.    Begin PVLINE3DLib.PVLine3D Line3D2 
  312.       Height          =   390
  313.       Left            =   3615
  314.       TabIndex        =   1
  315.       Top             =   4995
  316.       Width           =   2160
  317.       _Version        =   65536
  318.       _ExtentX        =   3810
  319.       _ExtentY        =   688
  320.       _StockProps     =   8
  321.       LineWidth       =   4
  322.       ShadowVertical  =   2
  323.    End
  324.    Begin PVLINE3DLib.PVLine3D Line3D4 
  325.       Height          =   1995
  326.       Left            =   3450
  327.       TabIndex        =   3
  328.       Top             =   3210
  329.       Width           =   420
  330.       _Version        =   65536
  331.       _ExtentX        =   741
  332.       _ExtentY        =   3519
  333.       _StockProps     =   8
  334.       LineOrientation =   1
  335.       LineWidth       =   4
  336.       ShadowVertical  =   2
  337.    End
  338.    Begin PVLINE3DLib.PVLine3D Line3D3 
  339.       Height          =   1980
  340.       Left            =   5430
  341.       TabIndex        =   2
  342.       Top             =   3210
  343.       Width           =   630
  344.       _Version        =   65536
  345.       _ExtentX        =   1111
  346.       _ExtentY        =   3493
  347.       _StockProps     =   8
  348.       LineOrientation =   1
  349.       LineWidth       =   4
  350.       ShadowVertical  =   2
  351.    End
  352.    Begin PVLINE3DLib.PVLine3D Line3D1 
  353.       Height          =   255
  354.       Left            =   3615
  355.       TabIndex        =   0
  356.       Top             =   3135
  357.       Width           =   2115
  358.       _Version        =   65536
  359.       _ExtentX        =   3731
  360.       _ExtentY        =   450
  361.       _StockProps     =   8
  362.       LineWidth       =   4
  363.       ShadowVertical  =   2
  364.    End
  365.    Begin PVLINE3DLib.PVLine3D Line6 
  366.       Height          =   1610
  367.       Left            =   510
  368.       TabIndex        =   8
  369.       Top             =   495
  370.       Width           =   75
  371.       _Version        =   65536
  372.       _ExtentX        =   132
  373.       _ExtentY        =   2831
  374.       _StockProps     =   8
  375.       LineOrientation =   1
  376.    End
  377. Attribute VB_Name = "Form1"
  378. Attribute VB_Creatable = False
  379. Attribute VB_Exposed = False
  380. Dim iTime As Integer
  381. Dim iLimit As Integer
  382. Dim iDirection As Integer
  383. Sub LineStyle(iStyle As Integer)
  384.     ' LineStyle is default property
  385.     ' Line1.LineStyle = iStyle
  386.     Line1 = iStyle
  387.     Line2 = iStyle
  388.     Line3 = iStyle
  389.     Line4 = iStyle
  390.     Line5 = iStyle
  391.     Line6 = iStyle
  392.     Line7 = iStyle
  393.     Line8 = iStyle
  394.     Line9 = iStyle
  395.     Line10 = iStyle
  396. End Sub
  397. Private Sub CloseButton_Click()
  398.     End
  399. End Sub
  400. Private Sub DashDotDotOption_Click()
  401.     LineStyle (4)
  402. End Sub
  403. Private Sub DashDotOption_Click()
  404.     LineStyle (3)
  405. End Sub
  406. Private Sub DashOption_Click()
  407.     LineStyle (1)
  408. End Sub
  409. Private Sub DotOption_Click()
  410.     LineStyle (2)
  411. End Sub
  412. Private Sub Form_Load()
  413.     iTime = 0
  414.     iLimit = Line1.Width
  415.     iDirection = iLimit / 20
  416. End Sub
  417. Private Sub SolidOption_Click()
  418.     LineStyle (0)
  419. End Sub
  420. Private Sub Timer1_Timer()
  421.     If iTime > 0 Then
  422.         Line1.Width = iLimit - iTime
  423.         Line2.Width = iLimit - iTime
  424.         Line1.Height = iLimit
  425.         Line2.Height = iLimit
  426.     Else
  427.         Line1.Width = iLimit
  428.         Line2.Width = iLimit
  429.         Line1.Height = iLimit + iTime
  430.         Line2.Height = iLimit + iTime
  431.     End If
  432.     iTime = iTime + iDirection
  433.     If iTime >= iLimit Then
  434.         iDirection = -iDirection
  435.         iTime = iLimit
  436.     End If
  437.     If iTime <= -iLimit Then
  438.         iDirection = -iDirection
  439.         iTime = -iLimit
  440.     End If
  441. End Sub
  442.