home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "*\AAXStats.vbp"
- Begin VB.Form TestForm
- Caption = "Form1"
- ClientHeight = 3570
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7095
- LinkTopic = "Form1"
- ScaleHeight = 3570
- ScaleWidth = 7095
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command6
- Caption = "Item Error"
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 4920
- TabIndex = 6
- Top = 840
- Width = 2055
- End
- Begin VB.CommandButton Command5
- Caption = "Remove Error"
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 4920
- TabIndex = 5
- Top = 240
- Width = 2055
- End
- Begin VB.CommandButton Command4
- Caption = "E X I T"
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 4920
- TabIndex = 4
- Top = 2880
- Width = 2055
- End
- Begin AXStats.Stats Stats1
- Left = 480
- Top = 2160
- _ExtentX = 1402
- _ExtentY = 1058
- End
- Begin VB.ListBox List1
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 3180
- Left = 2400
- Sorted = -1 'True
- TabIndex = 3
- Top = 240
- Width = 2415
- End
- Begin VB.CommandButton Command3
- Caption = "Show Statistics"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 120
- TabIndex = 2
- Top = 1440
- Width = 2055
- End
- Begin VB.CommandButton Command2
- Caption = "Display Data"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 120
- TabIndex = 1
- Top = 840
- Width = 2055
- End
- Begin VB.CommandButton Command1
- Caption = "Create Data Set"
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 120
- TabIndex = 0
- Top = 240
- Width = 2055
- End
- Attribute VB_Name = "TestForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- ' ******************************
- ' ******************************
- ' ** MASTERING VB6 **
- ' ** by Evangelos Petroutos **
- ' ** SYBEX, 1998 **
- ' ******************************
- ' ******************************
- Private Sub Command1_Click()
- List1.Clear
- Stats1.Clear
- For i = 1 To 100
- Stats1.Add Rnd() * 1000
- Next
- Command2.Enabled = True
- Command3.Enabled = True
- End Sub
- Private Sub Command2_Click()
- Dim i As Long
- List1.Clear
- For i = 1 To Stats1.Count
- List1.AddItem Format(Stats1.Item(i), "000.000000")
- Next
- End Sub
- Private Sub Command3_Click()
- StatsMsg = "There are " & Stats1.Count & " points in the data set" & vbCrLf
- StatsMsg = StatsMsg & "Their average is " & Stats1.Average & vbCrLf
- StatsMsg = StatsMsg & "The smalleest value " & Stats1.Min & vbCrLf
- StatsMsg = StatsMsg & "The largest value " & Stats1.Max
- MsgBox StatsMsg
- End Sub
- Private Sub Command4_Click()
- End
- End Sub
- Private Sub Command5_Click()
- On Error Resume Next
- Stats1.Remove 9999
- If Err.Number <> 0 Then
- MsgBox "ERROR # " & Err.Number - vbObjectError & vbCrLf & _
- Err.Description & vbCrLf & _
- "In module " & Err.Source
- End If
- End Sub
- Private Sub Command6_Click()
- On Error Resume Next
- Stats1.Item 9999
- If Err.Number <> 0 Then
- MsgBox "ERROR # " & Err.Number - vbObjectError & vbCrLf & _
- Err.Description & vbCrLf & _
- "In module " & Err.Source
- End If
- End Sub
-