|
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
|
|
|
|
|
You'll have to make the graph youself from the values. There are several graph libraries on CodeProject, such as this one[^] and this one[^].
|
|
|
|
|
How can i write all URL in to a file used in the browser.
Thankyou,
Yesu
|
|
|
|
|
You already asked this once and you have already received an answer (hint).
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
I would like to get all computer names and IP addresses within a specified range. I am unsure how I can get this information I was thinking using a for loop and starting at the lowest address and resolving the IP to get the name up to the highest address. I am not sure if that is possible and I am sure there is probably a better way. Please let me know thoughts. Any help will be much appreciated even if it is just a namespace to look into. Thanks.
Humble Programmer
|
|
|
|
|
You may be able to do this with scripting.
Use the tracert utility to reverse an IP address to a computer name, then parse the output to a cleaner list.
Try it out.
1) Use IPCONFIG on your machine
2) Use TRACERT x.x.x.x (where the x.x.x.x is your machine's IP address) and observe the output results.
3) You would capture this output to a file and parse the output to get the machine name.
Just a thought.
|
|
|
|
|
Are you sure this is a solution to the problem at hand? To me, this just shows how to convert an IP to a hostname, which can be done using .NET code[^]. I think he's looking for an efficient way to loop through a block of IP addresses.
|
|
|
|
|
I had previously written VBA forms to interact with different excel sheets in a workbook. I wrote code in each sheet's module to display a different form depending on which sheet is activated. Now I would like to recreate these forms to control excel sheets using VB.NET. My question is this
Would it be possible to program a VB.NET application to respond to changes of sheet in Excel?
Thanks,
Craig
"That rug really tied the room together."
|
|
|
|
|
|
Or he can buy a component from ComponentOne
|
|
|
|
|
Can the VSTO be used with Visual Basic 2008 Express?
"That rug really tied the room together."
|
|
|
|
|
Hey all,
I'm a little new to VB and I'm working in VB6. We have an application with about 3-8 mini-windows that all float separately and have code written to keep them from overlapping. My boss wants to put all these windows into a container window or master window in order to minimize the windows calls going on and hopefully clear up some crash bugs we have.
The trick is that he does not want me to use MDI but only "standard VB6 controls".
My next thought was maybe a docking framework would work for this but I'm having trouble finding one for VB6 that only uses standard VB6 controls?
Any thoughts or suggestions? I just need to be pointed in the right direction.
Thanks!
|
|
|
|
|
You should be able to use the SetParent[^] API to make those mini-windows children of the main form. Something like this example[^].
|
|
|
|
|
Will that cause the parent to become a container window that allows all to be minimized and moved at once?
modified on Wednesday, August 27, 2008 12:34 PM
|
|
|
|
|
Yes, but you will have to enumerate the children of the parent window to get their handles. (When you make a window a child of the parent, you could save its HWND in an array. That way you wouldn't later have to enumerate the parent's children to get their HWNDs.)
|
|
|
|
|
MDI is standard in VB6!
====================================
Transvestites - Roberts in Disguise!
====================================
|
|
|
|
|
Hi All,
Just one curious question whats the starting index of System.Collection object would be if I add few objects to it.
Thanks,
Aleem Mohammad,
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
|
Can you pls. confirm it. Yeah many people who do programming since a long time dont concerntrate it . Please can anybody confirm it
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
Find the kind of collection you want on MSDN and you'll see a line like this:
Indexes in this collection are zero-based.
If you want absolute definite confirmation you need to go to the source. You can also write some code to see.
|
|
|
|
|
It is starting with 1 I am expecting. I guess its correct. Thanks for the help.
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
If you're unwilling to write some code to test something so simple, you probably do your employer a disservice by naming them in your sig.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Ditto to JZ.
Pretty much everything is zero based. If there's any doubt in your mind, simple create the collection and add items to it. Then do your own testing iterating through the collection.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Why don't you just try it? Create an instance of the object and loop through it in your debugger?
|
|
|
|
|
As you suspected, those previous replies are all wrong. They're trying to mislead you for fun - don't listen to them. Fortunately, i'm here to give you the straight dope no problem: the starting index of a System.Collection object is 143 . Always 143 . Except in leap years on odd-numbered days of the month: then it's 2 - this is a subtle bug in many programs, so be sure you add code to test for it. You can usually speed up these checks by storing all such dates in a database table (i recommend using Access), and just querying for them before you start iterating on your collection.
That's it - no big deal, eh? Carry on, brother man!
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|