How to display the system menu on the taskbar without a titlebar or system menu button

W

Will Pittenger

I have a C# .NET program which does without a normal titlebar for its main
window. Trouble is, I still want the user to be able to access select
commands while the program is minimized. (I provided replacements for the
Minimize and Close buttons.) I understand how to modify the system menu.
In fact, I used to have a version of this program which did use a titlebar
and modified the menu with Win32 calls.

The current problem is that I no longer have a system menu at all. Is there
a way to handle the user's right click on my taskbar button for myself?
That would solve the problem. (I also created my own system menu for the
new window, but it is currently only shown when the user clicks on the icon
at the top left of the window.) I tried handling the WM_SYSCOMMAND message
as it has a "command" that is supposedly sent when the user uses the mouse
to access the system menu. However, that message is not sent when I
right-click on the task bar.

I am stumped how to solve this problem and would appreciate any suggestions.
 
C

Christian ASTOR

Will Pittenger said:
I have a C# .NET program which does without a normal titlebar for its main
window. Trouble is, I still want the user to be able to access select
commands while the program is minimized. (I provided replacements for the
Minimize and Close buttons.) I understand how to modify the system menu.
In fact, I used to have a version of this program which did use a titlebar
and modified the menu with Win32 calls.

The current problem is that I no longer have a system menu at all

If you create a popup window (without WS_CAPTION) but with WS_SYSMENU,
you'll have the System Menu...
 
W

Will Pittenger

The problem is that I am using C# .NET -- and .NET does not allow direct
access to the styles. I did find ways to override it, but those caused
major problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top