Sometimes Developers may need to perform implementations based on Machine’s Battery and CPU power status. How to collect such information’s quickly ? Don’t know how to do. Don’t worry. MiTec’s System Information Management Suite’s component helps to retrieve such information faster. In this blog post we will learn how to use the TMiTec_APM component to collect power status of your machine with the sample application.
Platforms: Windows.
Installation Steps:
You can easily install this Component Suite from GetIt Package Manager. The steps are as follows.
- Navigate In RAD Studio IDE->Tools->GetIt Package Manager->select Components in Categories->Components->Trail -MiTec system Information Component Suite 14.3 and click Install Button.
- Read the license and Click Agree All. An Information dialog saying ‘Requires a restart of RAD studio at the end of the process. Do you want to proceed? click yes and continue.
- It will download the plugin and installs it. Once installed Click Restart now.
How to run the Demo app:
- Navigate to the System Information Management Suite trails setup, Demos folder which is installed during Get It installation e.g) C:UsersDocumentsEmbarcaderoStudio21.0CatalogRepositoryMiTeC-14.3DemosDelphi10
- Open the APM project in RAD studio 10.4.1 compile and Run the application.
- This Demo App shows how to access the system information like Battery and CPU Power Status.
Components used in MSIC APM Demo App:
- TMiTeC_APM: Component to retrieve Machines AC, Processor and Battery Power Status information’s by its properties such as ACPowerStatus, Battery by Battery Index, ProcessorPowerStatus by CPU index.
- TTabSheet1 shows the list of AC power status and the selected battery status properties and TTabSheet2 shows the Processor power status properties.
Implementation Details:
- An instance is created APM of TMiTeC_APM. Using APM properties Machine AC Power status, Battery related properties such as Manufacturers, Charge status, Battery Life, etc. were added to the TabSheet1 UI components.
- Using APM.ProcessorPowerStatus property provides information such as Max Frequency, Current Frequency, Frequency Limit, etc. for the selected CPU index and were added to the TabSheet2 UI components.
It’s that simple to collect the Machines Power status information for your application. Use this MiTeC component suite and get the job done quickly.