Programmatically open charm bar, power bar and sta

2019-02-23 07:13发布

问题:

How to programatically open:

  • Charm Bar

  • Power Options

  • Start Menu

in windows 8?

I want to be able to open them from within my c# application

Cannot find the documentation I need

Thanks!

回答1:

I'd bet sending the Windows key (and the other key, as needed), would be sufficient.

Here is another post on how to do so with an API call.

SendKeys.Send and Windows Key

To open...

  • ... the Start Screen - just send the Windows key.
  • ... the Charms - send the Windows key + C.
  • ... the settings Charms bar (closet to the power options) - send the Windows key + I.


回答2:

Since the question was referred in another place I really thing should share the answer to that over her ..

The truth is a charmbar cannot be opened programatically in metro app development for metro you can access various charms menu like settings share.

Here's a full sample for that metro charms

But for c# wpf app

Heres a SO answer and I guess it works :)

open charms c#

This is the answer for the charms bar . Rest two need to search . If some one benifits :)

POWER :

Process.Start("powercfg.cpl"); reference : msdn pow options

AND start menu

Code Project

start menu