Question

Is it possible to open and close windows 8 charm bar using java program ? enter image description here

Was it helpful?

Solution

Let me take a stab at this:

If you have no problem in simulating key presses in your app, you can do something of the sort:

package robot;

import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;

public class KeyPresser {

    public static void main(String[] args) 
    {
         try {
                Robot robot = new Robot();

                // Simulate the charms shortcut: WIN key+C
                robot.keyPress(KeyEvent.VK_WINDOWS);
                robot.keyPress(KeyEvent.VK_C);
                robot.keyRelease(KeyEvent.VK_WINDOWS);
                robot.keyRelease(KeyEvent.VK_C);
            } catch (AWTException e) {
                e.printStackTrace();
            }
        // TODO Auto-generated method stub

    }

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top