Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 23rd, 2003, 11:02 PM
Authorized User
 
Join Date: Jul 2003
Posts: 40
Thanks: 0
Thanked 1 Time in 1 Post
Default CPU Speed

How can I use VB6 to get CPU Speed in MHz. unit ?
Thanks in advance .

 
Old January 7th, 2004, 10:07 AM
Authorized User
 
Join Date: Jul 2003
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alex_read
Default

' Needs a reference set to the microsoft WMI scripting runtime library

Private Sub Command1_Click()
    Dim cpuSet As SWbemObjectSet
    Dim cpu As SWbemObject

    Set cpuSet = GetObject("winmgmts:{impersonationLevel=impersonat e}"). _
    InstancesOf("Win32_Processor")

    For Each cpu In cpuSet
        Print "Processor name:" & cpu.Name
        Print "Current running speed:" & cpu.CurrentClockSpeed
        Print "Maxmimum running speed:" & cpu.MaxClockSpeed
    Next cpu
End Sub


 
Old January 8th, 2004, 10:31 PM
Authorized User
 
Join Date: Jul 2003
Posts: 40
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thank you Alex_read .. How can I find out specific knowledge like this ? Could you please give me the book name or useful web side??
Thanks a lot.

 
Old January 23rd, 2004, 08:12 AM
Authorized User
 
Join Date: Jul 2003
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alex_read
Default

www.mvps.org - brilliant site that, just enter "prcessor" in the search field (bottom right of the site) & hit the top link for this one!! ;c)

 
Old February 6th, 2004, 12:14 AM
Authorized User
 
Join Date: Jul 2003
Posts: 40
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks a lot..
I can find many useful information in this webside ..






Similar Threads
Thread Thread Starter Forum Replies Last Post
cpu information !! angelboy C# 2005 1 February 26th, 2007 09:31 AM
CPU Usage Optimisation avbabu VS.NET 2002/2003 1 January 21st, 2005 07:28 AM
Optimising CPU Usage avbabu BOOK: Professional Crystal Reports for VS.NET 0 December 15th, 2004 07:23 AM
100% CPU Usage anioak VS.NET 2002/2003 0 November 16th, 2004 08:47 AM
Getting CPU load in Windows using C srpathak C++ Programming 0 October 31st, 2003 05:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.