CPU Usage Dumping(now you can use images)

Posts 12 of 2 · Page 1 of 1
CPU Usage Dumping(now you can use images)
Well I know there was 1 reason people didn't use nifty GUI because they didn't want to use many images because it would take too much CPU or people would not use VB2005\2008 becuase of the cpu usage. Well heres your solution. Input this code into you module.

Public Class FluchCpuUsage

Private Declare Function SetProcessWorkingSetSize Lib "kernel32.dll" ( _
ByVal process As IntPtr, _
ByVal minimumWorkingSetSize As Integer, _
ByVal maximumWorkingSetSize As Integer) As Integer

Public Shared Sub FlushMemory()
GC.Collect()
GC.WaitForPendingFinalizers()
If (Environment.OSVersion.Platform = PlatformID.Win32NT) Then
SetProcessWorkingSetSize(Process.GetCurrentProcess ().Handle, -1, -1)
End If
End Sub

End Class
Don't modify the above code, you could result with crashing Applets


place a timer on the form with 1000 Intervals containing the code
FluchCpuUsage()
Nice , good job.
Posts 12 of 2 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?