' api declare
Public Declare Function GetTickCount Lib "kernel32" () As Long
' is one sec. ?
Public FPS_LastCheck As Long
' FPS were counted
Public FPS_Count As Long
' here is the actual FPS number
Public FPS_Current As Integer
' highest FPS
Public FPS_Highest As Integer
If GetTickCount() - FPS_LastCheck >= 1000 Then
FPS_Current = FPS_Count
FPS_Count = 0 ' set the counter
FPS_LastCheck = GetTickCount()
' highest FPS
If FPS_Current > FPS_Highest Then
FPS_Highest = FPS_Current
End If
End If
FPS_Count = FPS_Count + 1
Dim C1 As Graphics = Graphics.FromHwnd(New IntPtr(FindWindow("CrossFire", "CrossFire")))
Dim fontObj As Font
fontObj = New System.Drawing.Font("Times", 25, FontStyle.Bold)
C1.DrawString("[FPS:" & FPS_Current & "]", fontObj, Brushes.Chocolate, 10, 10)

Private Declare Function InvalidateRect Lib "user32" (ByVal hwnd As IntPtr, ByVal lpRect As IntPtr, ByVal bErase As Boolean) As Boolean
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
youre own draw fps 



