2025-11-28 00:35:46 +09:00
..
new
2025-11-28 00:35:46 +09:00
new
2025-11-28 00:35:46 +09:00

page_type, languages, products, name, urlFragment, description, extendedZipContent
page_type languages products name urlFragment description extendedZipContent
sample
cpp
cppwinrt
windows-api-win32
Power grid forecast sample PowerGrid Shows how to use power grid forecasts (Win32).
path target
LICENSE LICENSE

Power grid forecast sample

Shows how to use the PowerGrid Forecast API from Win32.

This sample covers the following:

  • Obtaining the power grid forecast
  • Registering for ForecastUpdated notifications
  • Looking for the lowest severity in a specified timeframe

Note This sample requires Visual Studio to build and Windows 11 to execute.

To obtain information about Windows development, go to the Windows Dev Center

To obtain information about Microsoft Visual Studio and the tools for developing Windows apps, go to Visual Studio

Reference

PowerGridForecast class

Power grid forecast from a UWP app

System requirements

  • Windows 11 SDK (build 26100 or higher)
  • Windows 11 (build 26100 or higher)

Build the sample

To build this sample:

  1. Start Visual Studio and select File > Open > Project/Solution.
  2. Go to the directory named for the sample, and double-click the Microsoft Visual Studio Solution (.sln) file.
  3. Press F7 or use Build > Build Solution to build the sample.

Run the sample

The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.

Deploying the sample

  • Select Build > Deploy Solution.

Deploying and running the sample

  • To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or select Debug > Start Without Debugging.