My application has a “hidden” hotkey that opens up a special User Activity screen anytime the user presses Control F12, while on the main menu. In clarion I did this by setting an alert key for the window, then in the Events.AlertKey embed point I tested to see if the Control F12 was pressed and opened the window. Like this:
IF Keycode() = CtrlF12 Start(BrwUserActivity,25000) END
So I do that in WinDev? Buttons can have shortcut keys so that’s a start. I created a button, and on the GUI tab, sat its shortcut key to Control F12. I placed my code on the button and it fired whenever the user pressed Control F12.
So then I hid the button, after all the goal was a “hidden” feature. And that is when I found out that the shortcut key is not active when the button is hidden. hmm…. That’s ok, it just so happens that you can place a control off of the window in WinDev and it doesn’t display and you don’t have to set it to not visible. Sure enough that worked, no button showing and my code fired on Control F12. Then I maximized the window……
And my button appeared.. ahhhrrrggg…..
After a brief tantrum I realized if I placed the button to the right of the window, and set the anchor to move to the right then the button would always remain off the window.
And tada!!!! I had it, a hidden hotkey feature.
So brief recap; place a button to the right of the window, set its anchor to move to the right, set the shortcut key to the key you want, and place your code on the button. That’s all there is to it.
Now, back to your regular schedule program….
Thanks for sharing that
LikeLike
I have found that putting the button above and to center outside of the window, then you do not need do anything further. No anchoring etc…
LikeLike
Great tip Wolfgan, be sure to tune into tomorrow WXlive.us webinar, I will be expanding on this “Putting control outside of the window” concept for my security logic.
LikeLike