home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Simple Benchmark VB3"
- ClientHeight = 2790
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 3330
- Height = 3195
- Left = 1035
- LinkTopic = "Form1"
- ScaleHeight = 2790
- ScaleWidth = 3330
- Top = 1140
- Width = 3450
- Begin CommandButton Command5
- Caption = "Form Loader"
- Height = 375
- Left = 960
- TabIndex = 4
- Top = 1980
- Width = 1275
- End
- Begin CommandButton Command4
- Caption = "Read Caption"
- Height = 375
- Left = 960
- TabIndex = 3
- Top = 1560
- Width = 1275
- End
- Begin CommandButton Command3
- Caption = "Build string"
- Height = 375
- Left = 960
- TabIndex = 2
- Top = 1140
- Width = 1275
- End
- Begin CommandButton Command2
- Caption = "Double Loop"
- Height = 375
- Left = 960
- TabIndex = 1
- Top = 720
- Width = 1275
- End
- Begin CommandButton Command1
- Caption = "Long Loop"
- Height = 375
- Left = 960
- TabIndex = 0
- Top = 300
- Width = 1275
- End
- Option Explicit
- Declare Function GetTickCount Lib "user" () As Long
- Sub Command1_Click ()
- Dim dl&
- Dim ctr&
- dl& = GetTickCount()
- For ctr& = 1 To 10000000
- Next ctr&
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
- Sub Command2_Click ()
- Dim dl&
- Dim ctr#
- dl& = GetTickCount()
- For ctr# = 1 To 600000 Step .1
- Next ctr#
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
- Sub Command3_Click ()
- Dim dl&
- Dim ctr&
- Dim s$
- dl& = GetTickCount()
- For ctr& = 1 To 20000
- s$ = s$ & "x"
- Next ctr&
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
- Sub Command4_Click ()
- Dim dl&
- Dim ctr&
- Dim s$
- dl& = GetTickCount()
- For ctr& = 1 To 40000
- s$ = command4.Caption
- Next ctr&
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
- Sub Command5_Click ()
- Dim dl&
- Dim ctr&
- dl& = GetTickCount()
- For ctr& = 1 To 100
- Form2.Show
- Form2.Refresh
- Unload Form2
- Next ctr&
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
-