11-21-2017 10:42 AM
Does anyone have any recommendations to add an "Easter Egg" to an exe?
For example, CRTL+SHIFT+E pops up a special window. I checked out the key down event for "this vi", but it responds to all key down events, even ones in controls. I also tried to add a shortcut key to the menu in the pane shortcut menu activation event, but it is not allowed for that type of menu.
Solved! Go to Solution.
11-21-2017 10:58 AM
Yes, the Key down event reacts to all key presses, as expected. You'll need to check the modifiers to see if Ctrl and Shift it pressed also to fire your Easter Egg.
11-21-2017 11:01 AM
Is that the only way? I was afraid of that. Will that event interfere with other events, like value change in a string/path control?
Is there a way to make a hidden user menu item? That way you can fire off only when the event occurs.
11-21-2017 12:09 PM
Just put the check for Ctrl + Shift + E in the Key Down? filter event. This event fires before the front panel receives the keypress. And then if you have a key down event for a string control, it will fire afterwards. Should not interfere unless you are a really fast typer and you have a lot of code that executes on key down (which is obviously not recommended).
11-21-2017 12:57 PM
You could add KeyDown events on a specific indicator.
Keep track of whats been pressed for the last X chars on that indicator and if they typed the correct string (into a numeric indicator for example) and the easteregg can launch.
11-21-2017 01:12 PM
Something like this:
11-21-2017 01:16 PM
I want to try an avoid using an indicator/control though. But it may be a good method to hide the egg in a specific place.