Here is my class wich is a quick and easy way to do contest:

An Example:
vb Code:
Option Explicit
Private C As New cFrogContest
Function VerySlow(a As Long, b As Long) As Double
VerySlow = 2
Dim x As Long
For x = 0 To 15
DoEvents
Next
End Function
Function Slow(a As Long, b As Long) As Double
Slow = 2
Dim x As Long
For x = 0 To 10
DoEvents
Next
End Function
Function Quick(a As Long, b As Long) As Long
Quick = 2
Dim x As Long
For x = 0 To 5
DoEvents
Next
End Function
Function VeryQuick(a As Long, b As Long) As Long
VeryQuick = 3
End Function
Private Sub Form_Load()
With C
.ContestName = "Test1"
.SaveDirectory = "c:\"
.Explanation = "It's only test"
.Arguments 20, 300
.Functions "VerySlow,VeryQuick,Slow,Quick"
.ReplaceFile = True
.Result = 2
.NumberOfLoops = 100
.TestIt
.ShowTest
End With
End Sub
Private Sub Form_Click()
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set C = Nothing
End Sub
Returns:
Code:
================================================================================
º Contest Name : Test
º Arguments : 20, 300
º Explanation : -
º Date : 02-06-2011 <-> 16:58:44
================================================================================
Results [not compiled] :
--------------------------------------------------------------------------------
1.- VeryQuick ------> 0,6934159 msec
2.- Quick ------> 2,6165497 msec
3.- Slow ------> 7,1359347 msec
4.- VerySlow ------> 7,9149945 msec
================================================================================
º The following functions return incorrect results :
--------------------------------------------------------------------------------
1.- VeryQuick
================================================================================
>>> Test made by cFrogContest.cls <-> Visit foro.elhacker.net <<<
================================================================================
I hope you like it, and i would appreciate coment to improve it, or any tip to learn something for the next time.
Specially my way to compare if it returns correct results
See you!