Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 352
  • Last Modified:

minimize in taskbar

How can I disable the minimize and restore option when the user clicks the mouse's right button in the taskbar ?
0
voxel
Asked:
voxel
  • 2
1 Solution
 
intheCommented:
Hi
you can remove them completely by doing:

removemenu(GetSystemMenu(Application.Handle, false),SC_MINIMIZE,MF_BYCOMMAND or MF_GRAYED or MF_DISABLED);
removemenu(GetSystemMenu(Application.Handle, false),SC_RESTORE,MF_BYCOMMAND or MF_GRAYED or MF_DISABLED);

Regards Barry

ps,
you should be able to do this:
EnableMenuItem(GetSystemMenu(Application.Handle, false), 0, MF_BYCOMMAND or MF_DISABLED or MF_GRAYED);
EnableMenuItem(GetSystemMenu(Application.Handle, false), 0, MF_BYCOMMAND or MF_DISABLED or MF_GRAYED);


but it dont seem to work all the time..
0
 
intheCommented:
note enablemenuitem
should have SC_MINIMIZE & SC_RESTORE where the 0 are.i was testing other stuff .
0
 
voxelAuthor Commented:
EnableMenuItem is not working in my computer too.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now