This is more a mental note for me...I finally decided to take the time to add a new template (based on an Inherited User Control) to the Visual Studio “Add New Item” dialog. Here's what I wanted, and eventually got (note: I work in VB.NET, so what you see may vary):
First off I got the new item, icon, and positioning in the list (2nd, next to Windows Form) working by fiddling around in the “C:\Program Files\Microsoft Visual Studio .NET 2003\Vb7\VBProjectItems“ and “C:\Program Files\Microsoft Visual Studio .NET 2003\Vb7\VBWizards“ folders, copying and amending the existing “WinForm” items. This is pretty straightforward to do as items in this dialog are read from a combination of text files and folders to tell the dialog how to dislpay (and to eventually add a new template to your project).
I also needed to add a line to “C:\Program Files\Microsoft Visual Studio .NET 2003\Vb7\VBProjectItems\Local Project Items\LocalProjectItems.vsdir“ to point to my newly-added files.
The last thing I was stuck on was the customised descriptions, but thankfully this article at CodeProject helped by pointing out where I needed to put the description in the “LocalProjectItems.vsdir“ file. Don't try looking for where Visual Studio pulls the in-built items descriptions from as it uses resource strings starting with “#“ in this file. After I put in the descriptions I actually had to restart Visual Studio - apart from this last point, it was very good at picking up changes I made on-the-fly.
This was a good exercise because up till now I have been too lazy to look into customising Visual Studio, although I have those sort of things on my long term TO-DO list to concentrate on after I'm using VS2005.
posted @ Wednesday, April 20, 2005 1:18 PM