LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add an Easter Egg to an EXE

Solved!
Go to solution

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.

 

Any suggestions?

 

Cheers,

mcduff

 

0 Kudos
Message 1 of 7
(3,034 Views)

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.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 7
(3,026 Views)

Thanks.

 

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.

 

Cheers,

mcduff

 

0 Kudos
Message 3 of 7
(3,020 Views)
Solution
Accepted by topic author mcduff

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). 

Example_VI_BD.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 4 of 7
(2,988 Views)

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.

0 Kudos
Message 5 of 7
(2,972 Views)

Something like this:egg.PNG

Message 6 of 7
(2,962 Views)

Thanks.

 

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.

 

Cheers,

mcduff

0 Kudos
Message 7 of 7
(2,959 Views)