K
K
kxooll2018-07-04 16:34:30
WPF
kxooll, 2018-07-04 16:34:30

How to recognize windows lock?

Hello. How to recognize windows lock and user change in WPF application?

private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if ((e.Key == Key.LWin || e.Key == Key.RWin) && e.Key == Key.L)
            {
                MessageBox.Show("Остановка");
            }
        }

This option is not suitable. Does not work. Can you somehow find out what state windows is in? Without reading data from the keyboard?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Zolotov, 2018-07-04
@kxooll

https://stackoverflow.com/questions/12293286/how-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question