I have a borderless splash screen form displaying loading progress and containing Minimize and Close buttons (something similar to splash screens seen in Office 2013). I would also like to provide system menu of the window which opens on right click anywhere in the form.
Currently I'm achieving opening the menu by sending keys Alt+Space.
System.Windows.Forms.SendKeys.SendWait("% ") 'sending Alt+Space
With this approach, window system menu always opens in top-left corner of the window.
Is there a way to programatically open the system menu the same way as Windows does natively when user right-clicks title bar of the window? An API call or message which pops up the menu open?
I would like to keep the system menu available in the app because I have added also items "About" and "Settings" in there. (This app serves as an independent launcher and updater of the core app.)
The platform is WPF with Windows Forms library included, too (due to that workaround using SendWait()
). Feel free to choose VB or C# in case of posting some code.