I am using this code below to display the current memory free on the computer and the total memory on computer (Virtual Memory that is...) When I put it in there to update with the timer..it just sits there and doesn't update. I even open up several huge programs and still get the same result. I have the timer enabled..and also have its Interval set at 1. What is wrong? Also..I want to show the percentage of free memory..how can I convert the number i get below to a percentage?
ThanksCode:Private Sub Form_load() SetWindowPos hwnd, conHwndTopmost, 100, 100, 400, 141, conSwpNoActivate Or_ conSwpShowWindow Timer1.Enabled = True End Sub Private Sub Timer1_Timer() 'Free Memory MemFreeLabel.Caption = modMemory.GetVirtualMemoryFree(True) 'Total Free MemTotalLabel.Caption = modMemory.GetPhysicalMemoryTotal(True) End Sub




Reply With Quote