"Dilip" <(E-Mail Removed)> wrote in message
news:3f8415c0-e2bb-4306-afe2-(E-Mail Removed)...
>
> I have written a C# based console application. Due to some issues
> thats been causing me endless nightmares, I was wondering, is there a
> way to prevent right mousebutton clicks on my application when it
> appears on the task bar? I don't want the context menu showing up
> when a user right clicks on it. I don't want the user to be able to
> do anything with it other than stare at it in its minimized form. I
> know we can P/Invoke into some Win32 APIs to hide it completely
> (FindWindow/ShowWindow/SW_HIDE) but for the moment is what I am aiming
> to do possible?
>
> I know there are many other ways to sidestep this problem completely
> but the for the moment I am stuck with what I have (due to legacy
> issues) and I need to find a way to disable the context menu from
> showing up when an user right clicks on my app on the task bar.
>
I used the gpedit.msc in the Run box on the machine running Vista Ultimate,
went to the group policy listed below and enabled it. No one can
right-click an application setting on the task bar.
http://www.microsoft.com/technet/pro....mspx?mfr=true
Maybe, that's what you need to do, if this is a dedicated machine for
running legacy solutions.
The link was for Win 2K, but the same thing can be done on Vista, and I will
assume it can be done for other MS NT class O/S(s).