问题描述
我正在开发一个应用程序,因为我必须显示CPU使用情况历史记录图和Pagefile使用情况历史记录图.
当我们打开任务管理器时,它将显示窗口,在该性能选项卡中,将显示CPU使用情况历史记录图形和Pagefile使用情况历史记录图形.
如何使用vb.Net从任务管理器中获取这些图形.
如果有人对此有所了解,请提供一些源代码以完成此任务.
为了从taskmanager获得CPU使用速度,我使用以下代码
将m_PerformanceCounter用作新的System.Diagnostics.PerformanceCounter("Processor",%Processor Time","_Total")
Dim cupcount作为字符串= CInt(m_PerformanceCounter.NextValue())& %"
这里m_PerformanceCounter.NextValue()将给出cpu的使用百分比.
如果有人知道如何显示这些图形,请提供一些源代码以完成此任务.
Thanks
pavani
Hi,
I am developing one application in that I have to display CPU usage history graph and Pagefile usage history graph.
When we open task manager it will display window, in that performance tab it will display CPU usage history graph and Pagefile usage history graph.
How to get those graphs from Task manager using vb.Net.
If anybody know about this please provide me some source code to complete this task.
To get the CPU Usage speed from taskmanager I used the following code
Private m_PerformanceCounter As New System.Diagnostics.PerformanceCounter("Processor", "% Processor Time", "_Total")
Dim cupcount As String = CInt(m_PerformanceCounter.NextValue()) & "%"
Here m_PerformanceCounter.NextValue() will gives the cpu usage percentage.
If anybody know about how to display those graphs, please provide me some source code to complete this task.
Thanks
pavani
推荐答案
这篇关于使用vb.net从任务管理器中获取CPU使用历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!