Home All Groups Group Topic Archive Search About

How to add About... entry to Window (top left) Context Menu?

Author
13 Apr 2006 9:12 PM
Joe HM
Hello -

I was wondering how I can add an entry called About... to the menu that
pops up when I click on the icon on the top left of the Dialog Title?
By default it has entries like Close and Minimize.

I have seen extra entries added there in some applications.  How can I
do that with VB.NET?

Thanks!
Joe

Author
14 Apr 2006 12:24 AM
Mattias Sjögren
>I have seen extra entries added there in some applications.  How can I
>do that with VB.NET?

There's no framework support for doing it so you need to work with the
GetSystemMenu and InsertMenuItem Win32 APIs, plus handling window
messages to know when the item is selected.

Personally I'd recommend putting it in a regular application menu
where it's a lot more discoverable.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.