'General
'Framecounter
Global StartTime As Long
Global FrameCount As Long
Global FPS As Long
'Game main
Sub Main()
Dim Temp As Long
'Main loop
While Active
Temp = GetTickCount
'Do game stuff here
'Calculate FPS
If StartTime < GetTickCount Then
FPS = FrameCount
'Code to show FPS goes here
FrameCount = 0
StartTime = GetTickCount + 1000
End If
FrameCount = FrameCount + 1
DoEvents
Wend
End Sub