1. sayfa (Toplam 1 sayfa)

CHANGE SCREEN ON PRESS OF ESCAPE KEY FROM PHYSICAL KEYBOARD

Gönderilme zamanı: 24 Ağu 2016, 10:54
gönderen khan4search123
Hi,

I want to change the screen on my SCADA on press of ESCAPE Key from the physical keyboard of my Laptop.
I am using the following script;

public partial class ScriptModule1
{
private void Window_KeyDown(System.Object sender, System.Windows.Input.KeyboardEventArgs e)
{
if (Console.ReadKey().Key == ConsoleKey.Escape)
{
Globals.Screen2.Show();
}
}
}

The compiler doesn't show any error but nothing happens on press of ESCAPE KEY.

Re: CHANGE SCREEN ON PRESS OF ESCAPE KEY FROM PHYSICAL KEYBO

Gönderilme zamanı: 24 Ağu 2016, 14:07
gönderen Teknik2
Hi,
You can't use like this because iX don't have Window_KeyDown action. Because of this you can't attach your code to this action. Easy use for this situation is Funciton Keys. You can use same thing with F1. Second choice is thread. But it doesn't suggest if you don't c# well
1.png

Re: CHANGE SCREEN ON PRESS OF ESCAPE KEY FROM PHYSICAL KEYBO

Gönderilme zamanı: 25 Ağu 2016, 08:57
gönderen khan4search123
Ok
Thank you..