home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / RealTime Graphics ActiveX / DATA.3 / Examples / VB / Simple / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1997-10-20  |  7.5 KB  |  180 lines

  1. VERSION 5.00
  2. Object = "{7A0C53E3-EB00-11D0-8083-00C0F6A06F60}#1.0#0"; "SCROLLX.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   6804
  6.    ClientLeft      =   48
  7.    ClientTop       =   336
  8.    ClientWidth     =   9168
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   6804
  11.    ScaleWidth      =   9168
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin SCROLLXLib.ScrollX ScrollX1 
  14.       Height          =   4212
  15.       Left            =   1320
  16.       TabIndex        =   0
  17.       Top             =   960
  18.       Width           =   6732
  19.       _Version        =   65536
  20.       _ExtentX        =   11874
  21.       _ExtentY        =   7429
  22.       _StockProps     =   0
  23.       DataCursorHandle=   "Form1.frx":0000
  24.       AxisHandle      =   "Form1.frx":009A
  25.       AxisLableHandle =   "Form1.frx":00C4
  26.       AxisMin         =   "Form1.frx":00EE
  27.       AxisMax         =   "Form1.frx":0128
  28.       ScaleEnable     =   "Form1.frx":0162
  29.       AxisEnable      =   "Form1.frx":0184
  30.       AxisInterceptTrack=   "Form1.frx":01AE
  31.       AxisLabelsEnable=   "Form1.frx":01D8
  32.       AxisScaleMode   =   "Form1.frx":0202
  33.       AxisIntercept   =   "Form1.frx":022C
  34.       AxisColor       =   "Form1.frx":0266
  35.       AxisLineWidth   =   "Form1.frx":0290
  36.       AxisMinorTicks  =   "Form1.frx":02BA
  37.       AxisMajorTickInterval=   "Form1.frx":02E4
  38.       AxisTickStyle   =   "Form1.frx":031E
  39.       AxisAutoAxis    =   "Form1.frx":0348
  40.       AxisLabelPos    =   "Form1.frx":0372
  41.       AxisLabelTimeBase=   "Form1.frx":039C
  42.       AxisLabelAutoUpdate=   "Form1.frx":03C6
  43.       AxisLabelStartHour=   "Form1.frx":03F0
  44.       AxisLabelStartMin=   "Form1.frx":041A
  45.       AxisLabelStartSec=   "Form1.frx":0444
  46.       AxisLabelDecs   =   "Form1.frx":046E
  47.       AxisLabelColor  =   "Form1.frx":0498
  48.       AxisLabelFont   =   "Form1.frx":04C2
  49.       AxisLabelFontStyle=   "Form1.frx":04F4
  50.       AxisLabelFontSize=   "Form1.frx":051E
  51.       AxisNumericStyle=   "Form1.frx":0548
  52.       AxisTitleString =   "Form1.frx":0572
  53.       AxisTitleFont   =   "Form1.frx":0590
  54.       AxisLabelStrings=   "Form1.frx":05BD
  55.       NumAxisLabelStrings=   "Form1.frx":05DB
  56.       AxisLabelStringsEnable=   "Form1.frx":0605
  57.       AxisLabelStringsStart=   "Form1.frx":062F
  58.       AxisTitleColor  =   "Form1.frx":0659
  59.       AxisTitleFontStyle=   "Form1.frx":1DB87
  60.       AxisTitleFontSize=   "Form1.frx":1DBB1
  61.       AxisTitlePos    =   "Form1.frx":1DBDB
  62.       AxisGridEnable  =   "Form1.frx":1DC05
  63.       AxisGridColor   =   "Form1.frx":1DC2F
  64.       AxisGridLineWidth=   "Form1.frx":1DC59
  65.       AxisGridLineStyle=   "Form1.frx":1DC83
  66.       AxisGridType    =   "Form1.frx":1DCAD
  67.       TitleString     =   "Form1.frx":1DCD7
  68.       TitleFont       =   "Form1.frx":1DD03
  69.       TitleColor      =   "Form1.frx":1DD2F
  70.       TitleFontStyle  =   "Form1.frx":1DD55
  71.       TitleFontSize   =   "Form1.frx":1DD7B
  72.       TitlePos        =   "Form1.frx":1DDA1
  73.       PlotHandle      =   "Form1.frx":1DDC7
  74.       DataSet         =   "Form1.frx":1DDF1
  75.       SDataNumPlotPoints=   "Form1.frx":1DE1B
  76.       SDataEnable     =   "Form1.frx":1DE45
  77.       SDataName       =   "Form1.frx":1DE6F
  78.       SDataNumGroups  =   "Form1.frx":1DE92
  79.       SDataType       =   "Form1.frx":1DEBC
  80.       SPlotType       =   "Form1.frx":1DEE6
  81.       SPlotDataset    =   "Form1.frx":1DF10
  82.       SPlotRefAxes    =   "Form1.frx":1DF3A
  83.       SPlotObjectOutlineColor=   "Form1.frx":1DF64
  84.       ScrollStepMode  =   "Form1.frx":1DF8E
  85.       ScrollSweepLineColor=   "Form1.frx":1DFB8
  86.       ScrollRelReset  =   "Form1.frx":1DFE2
  87.       ScrollRelSize   =   "Form1.frx":1E01C
  88.       ScrollSampleInterval=   "Form1.frx":1E056
  89.       ScrollXYNumPoints=   "Form1.frx":1E090
  90.       ScrollDirection =   "Form1.frx":1E0BA
  91.       ScrollBarWidth  =   "Form1.frx":1E0E4
  92.       AxisGridUpdatePeriod=   "Form1.frx":1E11E
  93.       AxisGridUpdateMode=   "Form1.frx":1E158
  94.       ScrollHistoryBufferSize=   "Form1.frx":1E182
  95.       ScrollAlarmUpdatePeriod=   "Form1.frx":1E1AC
  96.       ScrollAlarmUpdateMode=   "Form1.frx":1E1E6
  97.       ScrollAlarmHorizontal=   "Form1.frx":1E210
  98.       SDataSimulationMode=   "Form1.frx":1E23A
  99.       ScrollNormalAlarmColor=   "Form1.frx":1E264
  100.       ScrollLowAlarmColor=   "Form1.frx":1E28E
  101.       ScrollHighAlarmColor=   "Form1.frx":1E2B8
  102.       ScrollLowLowAlarmColor=   "Form1.frx":1E2E2
  103.       ScrollHighHighAlarmColor=   "Form1.frx":1E30C
  104.       ScrollHighHighAlarmEnable=   "Form1.frx":1E336
  105.       ScrollLowAlarmEnable=   "Form1.frx":1E360
  106.       ScrollLowLowAlarmEnable=   "Form1.frx":1E38A
  107.       ScrollHighAlarmEnable=   "Form1.frx":1E3B4
  108.       ScrollAlarmMarksEnable=   "Form1.frx":1E3DE
  109.       ScrollSetpointEnable=   "Form1.frx":1E408
  110.       ScrollHighHighAlarmValue=   "Form1.frx":1E432
  111.       ScrollHighAlarmValue=   "Form1.frx":1E46C
  112.       ScrollLowAlarmValue=   "Form1.frx":1E4A6
  113.       ScrollLowLowAlarmValue=   "Form1.frx":1E4E0
  114.       ScrollSetpointValue=   "Form1.frx":1E51A
  115.       SDataXData0     =   "Form1.frx":1E554
  116.       SDataXData1     =   "Form1.frx":1E56E
  117.       SDataXData2     =   "Form1.frx":1E588
  118.       SDataXData3     =   "Form1.frx":1E5A2
  119.       SDataYData0     =   "Form1.frx":1E5BC
  120.       SDataYData1     =   "Form1.frx":1E5D6
  121.       SDataYData2     =   "Form1.frx":1E5F0
  122.       SDataYData3     =   "Form1.frx":1E60A
  123.       ScrollLineColor0=   "Form1.frx":1E624
  124.       ScrollLineColor1=   "Form1.frx":1E6BE
  125.       ScrollLineColor2=   "Form1.frx":1E758
  126.       ScrollLineColor3=   "Form1.frx":1E7F2
  127.       ScrollLineStyle0=   "Form1.frx":1E88C
  128.       ScrollLineStyle1=   "Form1.frx":1E926
  129.       ScrollLineStyle2=   "Form1.frx":1E9C0
  130.       ScrollLineStyle3=   "Form1.frx":1EA5A
  131.       ScrollLineThickness0=   "Form1.frx":1EAF4
  132.       ScrollLineThickness1=   "Form1.frx":1EB8E
  133.       ScrollLineThickness2=   "Form1.frx":1EC28
  134.       ScrollLineThickness3=   "Form1.frx":1ECC2
  135.       ScrollTagName0  =   "Form1.frx":1ED5C
  136.       ScrollTagName1  =   "Form1.frx":1EE4C
  137.       ScrollTagName2  =   "Form1.frx":1EF3C
  138.       ScrollTagName3  =   "Form1.frx":1F02C
  139.    End
  140. Attribute VB_Name = "Form1"
  141. Attribute VB_GlobalNameSpace = False
  142. Attribute VB_Creatable = False
  143. Attribute VB_PredeclaredId = True
  144. Attribute VB_Exposed = False
  145. Option Explicit
  146. Dim rData1(4) As Double
  147. Private Sub Form_Load()
  148.     ScrollX1.SDataEnable(0) = True   ' enable the 1st data set
  149.     ScrollX1.SPlotType(0) = SCROLLING_LINE_GRAPH
  150.     ScrollX1.SDataNumGroups(0) = 4   ' four channels of data
  151.     rData1(0) = 2
  152.     rData1(1) = 4
  153.     rData1(2) = 6
  154.     rData1(3) = 8
  155.     'axis
  156.     ScrollX1.AxisMax(X_AXIS1) = 25#    ' x axis from 0 - 25
  157.     ScrollX1.AxisEnable(X_AXIS2) = True   'enable the second x axis
  158.     ScrollX1.AxisEnable(Y_AXIS2) = True   'enable the second x axis
  159.     ScrollX1.AxisMajorTickInterval(X_AXIS1) = 5#    'label every 5 units
  160.     'alarm updating
  161.     ScrollX1.ScrollAlarmMarksEnable(0) = True   'enable alarm marks
  162.     ScrollX1.ScrollLowAlarmEnable(0) = True   'enable lo alarm line
  163.     ScrollX1.ScrollHighAlarmEnable(0) = True   'enable hi alarm line
  164.     ScrollX1.ScrollSetpointEnable(0) = True   'enable set point line
  165.     'title
  166.     ScrollX1.TitleString(TITLE1) = "Scroll Graph"   'graph title
  167.     'window
  168.     ScrollX1.WindowBackgroundColor = RGB_LIGHTBLUE  'background color
  169.     ScrollX1.WindowBorderStyle = RC_HIGH
  170.     'use internal timer
  171.     ScrollX1.EnableInternalTimer = True
  172. End Sub
  173. Private Sub ScrollX1_OnInternalTimer()
  174.  Dim i As Integer
  175.   For i = 0 To ScrollX1.SDataNumGroups(0) - 1
  176.      rData1(i) = rData1(i) + 0.5 * (0.5 - Rnd)
  177.   Next i
  178.    Call ScrollX1.UpdateDynData(0, rData1(0))
  179. End Sub
  180.