本文介绍了VB 2010 RAM监视器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家快来参加论坛:D.在我正在执行的项目的代码部分中需要一些帮助.我的RAM监视器似乎无法正常工作,有时在与任务管理器配合使用时,其值会加倍或显示不正确的值.我正在使用的代码如下:

Hi people, just signed up to the forum :D. need a little help with a section of my code for a project I am doing. my RAM monitor doesn''t seem to work properly and sometimes doubles the value or displays a incorrect value when put against task manager. the code I am using is below:

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
    Dim SystemRAM As Integer = CDec(PerformanceCounter3.NextValue.ToString())        
    Dim SystemRAM2 As Integer

    SystemRAM2 = 80 - SystemRAM                                                      
    Label34.Text = SystemRAM2.ToString() & " %"                                        
    On Error Resume Next                                                             
    ProgressBar3.Value = SystemRAM2.ToString
End Sub



希望有人能帮忙???

欢呼声
ElmoK11



hope someone can help ???

cheers
ElmoK11

推荐答案

category name: memory
counter name: Available MBytes
generate member:true
instance lifetime: Global
modifiers: friend



看看它是否也波动

[/Edit]



to see if that fluctuates as well

[/Edit]


这篇关于VB 2010 RAM监视器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 20:53