Results 1 to 16 of 16

Thread: [RESOLVED] Very Compatible Processor Speed Function

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    Resolved [RESOLVED] Very Compatible Processor Speed Function

    I'm looking for a function that can get a computer's processor speed in Windows 98/ME/2000/2003/XP/Vista. Also, I want it to be compatible with multiple processor systems. Thanks

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Very Compatible Processor Speed Function

    Probably the most widely compatible technology to use is WMI. There are several threads on the topic in question on our forums.

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    Re: Very Compatible Processor Speed Function

    Yeah, I'm currently using http://freevbcode.com/ShowCode.Asp?ID=7766 but it says that my 1.6ghz Core Duo laptop has 756mhz.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Very Compatible Processor Speed Function

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    Re: Very Compatible Processor Speed Function

    It says 797mhz. Maybe that was the same thing as http://freevbcode.com/ShowCode.Asp?ID=7766. I think I was wrong when I said 756. Anyway, that's still not right but thanks for trying

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Very Compatible Processor Speed Function

    Works fine for me on Xp and even on Vista.
    Attached Images Attached Images  
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7
    Hyperactive Member FireKnox101's Avatar
    Join Date
    Aug 2005
    Location
    Snohomish,Washington
    Posts
    301

    Re: Very Compatible Processor Speed Function

    the reason it says your cpu speed is slower than it really is, is because when your not doing any thing on your labtop it slows the cpu down, but if your doing alot of work like, playing a game or watching a dvd it should go up. well at leasts thats what mine dose.

    Im currently using: VB.NET 2003, And VB 2005 Express
    My Projects
    Form Them Show Keypress In App
    Simple Ping Control

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Very Compatible Processor Speed Function

    Thats correct, forgot about that feature on certain CPUs. Supossed to help out with heat and fan speed lowers too.

    What CPU do you have?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    Re: Very Compatible Processor Speed Function

    Well, HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\~MHZ has the right value. It says it's 1596mhz.

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Very Compatible Processor Speed Function

    Ah just noticed you have a laptop so its the energy saving "m" type processor.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    Re: Very Compatible Processor Speed Function

    Hey, that's weird! I just tried your code again to see what CPU it says I have:

    I tried it twice and I got this the first time:
    x86 Family 6 Model 14 Stepping 8
    Speed: 1596 Mhz
    x86 Family 6 Model 14 Stepping 8
    Speed: 1595 Mhz

    But this again the second time:
    x86 Family 6 Model 14 Stepping 8
    Speed: 798 Mhz
    x86 Family 6 Model 14 Stepping 8
    Speed: 797 Mhz

    Is there a way to make it constant?

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Very Compatible Processor Speed Function

    It could be because of the dual core? 798*2=1596?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  13. #13

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    Re: Very Compatible Processor Speed Function

    I guess but it said 1596 one time but then I closed it and tried it again and it said 797 again.

  14. #14
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Very Compatible Processor Speed Function

    Ok, this should be it. There is a CurrentClockSpeed and a MaxClockSpeed. Try using the oProcessor.MaxClockSpeed instead.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  15. #15

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    400

    Re: Very Compatible Processor Speed Function

    Yay, thank you!

  16. #16
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [RESOLVED] Very Compatible Processor Speed Function

    Here is the listing of all the CPU properties.
    vb Code:
    1. txtProcessor.Text = txtProcessor.Text & "AddressWidth: " & oProcessor.AddressWidth
    2. txtProcessor.Text = txtProcessor.Text & "Architecture: " & oProcessor.Architecture
    3. txtProcessor.Text = txtProcessor.Text & "Availability: " & oProcessor.Availability
    4. txtProcessor.Text = txtProcessor.Text & "Caption: " & oProcessor.Caption
    5. txtProcessor.Text = txtProcessor.Text & "ConfigManagerErrorCode: " & oProcessor.ConfigManagerErrorCode
    6. txtProcessor.Text = txtProcessor.Text & "ConfigManagerUserConfig: " & oProcessor.ConfigManagerUserConfig
    7. txtProcessor.Text = txtProcessor.Text & "CpuStatus: " & oProcessor.CpuStatus
    8. txtProcessor.Text = txtProcessor.Text & "CreationClassName: " & oProcessor.CreationClassName
    9. txtProcessor.Text = txtProcessor.Text & "CurrentClockSpeed: " & oProcessor.CurrentClockSpeed
    10. txtProcessor.Text = txtProcessor.Text & "CurrentVoltage: " & oProcessor.CurrentVoltage
    11. txtProcessor.Text = txtProcessor.Text & "DataWidth: " & oProcessor.DataWidth
    12. txtProcessor.Text = txtProcessor.Text & "Description: " & oProcessor.Description
    13. txtProcessor.Text = txtProcessor.Text & "DeviceID: " & oProcessor.DeviceID
    14. txtProcessor.Text = txtProcessor.Text & "ErrorCleared: " & oProcessor.ErrorCleared
    15. txtProcessor.Text = txtProcessor.Text & "ErrorDescription: " & oProcessor.ErrorDescription
    16. txtProcessor.Text = txtProcessor.Text & "ExtClock: " & oProcessor.ExtClock
    17. txtProcessor.Text = txtProcessor.Text & "Family: " & oProcessor.Family
    18. txtProcessor.Text = txtProcessor.Text & "InstallDate: " & oProcessor.InstallDate
    19. txtProcessor.Text = txtProcessor.Text & "L2CacheSize: " & oProcessor.L2CacheSize
    20. txtProcessor.Text = txtProcessor.Text & "L2CacheSpeed: " & oProcessor.L2CacheSpeed
    21. txtProcessor.Text = txtProcessor.Text & "LastErrorCode: " & oProcessor.LastErrorCode
    22. txtProcessor.Text = txtProcessor.Text & "Level: " & oProcessor.Level
    23. txtProcessor.Text = txtProcessor.Text & "LoadPercentage: " & oProcessor.LoadPercentage
    24. txtProcessor.Text = txtProcessor.Text & "Manufacturer: " & oProcessor.Manufacturer
    25. txtProcessor.Text = txtProcessor.Text & "MaxClockSpeed: " & oProcessor.MaxClockSpeed
    26. txtProcessor.Text = txtProcessor.Text & "Name: " & objItem.Name
    27. txtProcessor.Text = txtProcessor.Text & "OtherFamilyDescription: " & oProcessor.OtherFamilyDescription
    28. txtProcessor.Text = txtProcessor.Text & "PNPDeviceID: " & oProcessor.PNPDeviceID
    29. txtProcessor.Text = txtProcessor.Text & "PowerManagementSupported: " & oProcessor.PowerManagementSupported
    30. txtProcessor.Text = txtProcessor.Text & "ProcessorId: " & oProcessor.ProcessorId
    31. txtProcessor.Text = txtProcessor.Text & "ProcessorType: " & oProcessor.ProcessorType
    32. txtProcessor.Text = txtProcessor.Text & "Revision: " & oProcessor.Revision
    33. txtProcessor.Text = txtProcessor.Text & "Role: " & oProcessor.Role
    34. txtProcessor.Text = txtProcessor.Text & "SocketDesignation: " & oProcessor.SocketDesignation
    35. txtProcessor.Text = txtProcessor.Text & "Status: " & oProcessor.Status
    36. txtProcessor.Text = txtProcessor.Text & "StatusInfo: " & oProcessor.StatusInfo
    37. txtProcessor.Text = txtProcessor.Text & "Stepping: " & oProcessor.Stepping
    38. txtProcessor.Text = txtProcessor.Text & "SystemCreationClassName: " & oProcessor.SystemCreationClassName
    39. txtProcessor.Text = txtProcessor.Text & "SystemName: " & oProcessor.SystemName
    40. txtProcessor.Text = txtProcessor.Text & "UniqueId: " & oProcessor.UniqueId
    41. txtProcessor.Text = txtProcessor.Text & "UpgradeMethod: " & oProcessor.UpgradeMethod
    42. txtProcessor.Text = txtProcessor.Text & "Version: " & oProcessor.Version
    43. txtProcessor.Text = txtProcessor.Text & "VoltageCaps: " & oProcessor.VoltageCaps
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width