473,666 Members | 2,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing menu option in VS.NET

Hi,

When right clicking a project in Solution Explorer, and chosing the 'Add'
menu, a bunch of choices come up depending on the project type. So there
might be 'Add Module', 'Add Class', 'Add Windows Form', etc.

Is there a way to modify what is on this menu? I would like to include a
custom file type in that menu, that is already defined and appears in the
'Add New Item' dialog box. That way instead of chosing 'Add New Item' and
chosing the right file type from the dialog, someone could just chose it
from the menu.

Thanks
Jul 21 '05 #1
4 1385
Interesting. I found that this is apparently controlled by a file. Fire up a
text editor and open C:\Program Files\Microsoft Visual Studio .NET
2003\VC#\CSharp ProjectItems\Lo calProjectItems \LocalProjectIt ems.vsdir
(substitute with your install path). By copying the "new CodeFile.cs" line
and modifying it like so:

...\NewPythonFi le.py|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|# 2261|80|#2267|{ F
AE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4 599|0|PythonFil e.py

And then creating an empty file under C:\Program Files\Microsoft Visual
Studio .NET 2003\VC#\CSharp ProjectItems called "NewPythonFile. py" the item
shows up under the "Add New Item" dialog and is added successfully to the
project as "NewPythonFile1 .py". Of course who knows what all those numbers
and the GUID are for.

The icon in the dialog is the right one, but when added to the project its
shown with the generic text icon.

There's probably a better way to do this, but this should get you started =)
--
_______________ _____
Klaus H. Probst, MVP
http://www.vbbox.com/

"Marina" <nospam> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

When right clicking a project in Solution Explorer, and chosing the 'Add'
menu, a bunch of choices come up depending on the project type. So there
might be 'Add Module', 'Add Class', 'Add Windows Form', etc.

Is there a way to modify what is on this menu? I would like to include a
custom file type in that menu, that is already defined and appears in the
'Add New Item' dialog box. That way instead of chosing 'Add New Item' and
chosing the right file type from the dialog, someone could just chose it
from the menu.

Thanks

Jul 21 '05 #2
I already have all this working.

I already have my new template appearing in the Add New Item dialog - I
mentioned this in my post.

What I don't have, is have it as a separate item when you right click on the
project in Solution Explorer, chose Add, and then get the menu options. The
options in this context menu is what I need to modify.

"Klaus H. Probst" <us*******@vbbo x.com> wrote in message
news:ej******** ******@TK2MSFTN GP09.phx.gbl...
Interesting. I found that this is apparently controlled by a file. Fire up a text editor and open C:\Program Files\Microsoft Visual Studio .NET
2003\VC#\CSharp ProjectItems\Lo calProjectItems \LocalProjectIt ems.vsdir
(substitute with your install path). By copying the "new CodeFile.cs" line
and modifying it like so:

...\NewPythonFi le.py|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|# 2261|80|#2267|{ F AE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4 599|0|PythonFil e.py

And then creating an empty file under C:\Program Files\Microsoft Visual
Studio .NET 2003\VC#\CSharp ProjectItems called "NewPythonFile. py" the item
shows up under the "Add New Item" dialog and is added successfully to the
project as "NewPythonFile1 .py". Of course who knows what all those numbers
and the GUID are for.

The icon in the dialog is the right one, but when added to the project its
shown with the generic text icon.

There's probably a better way to do this, but this should get you started =)

--
_______________ _____
Klaus H. Probst, MVP
http://www.vbbox.com/

"Marina" <nospam> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

When right clicking a project in Solution Explorer, and chosing the 'Add' menu, a bunch of choices come up depending on the project type. So there might be 'Add Module', 'Add Class', 'Add Windows Form', etc.

Is there a way to modify what is on this menu? I would like to include a custom file type in that menu, that is already defined and appears in the 'Add New Item' dialog box. That way instead of chosing 'Add New Item' and chosing the right file type from the dialog, someone could just chose it
from the menu.

Thanks


Jul 21 '05 #3
You'll probably have to write an add-in for that. I can't see where these
menu entries can be modified manually.
--
_______________ _____
Klaus H. Probst, MVP
http://www.vbbox.com/

"Marina" <mz*******@hotm ail.com> wrote in message
news:eN******** ******@TK2MSFTN GP12.phx.gbl...
I already have all this working.

I already have my new template appearing in the Add New Item dialog - I
mentioned this in my post.

What I don't have, is have it as a separate item when you right click on the project in Solution Explorer, chose Add, and then get the menu options. The options in this context menu is what I need to modify.

"Klaus H. Probst" <us*******@vbbo x.com> wrote in message
news:ej******** ******@TK2MSFTN GP09.phx.gbl...
Interesting. I found that this is apparently controlled by a file. Fire up
a
text editor and open C:\Program Files\Microsoft Visual Studio .NET
2003\VC#\CSharp ProjectItems\Lo calProjectItems \LocalProjectIt ems.vsdir
(substitute with your install path). By copying the "new CodeFile.cs" line and modifying it like so:

...\NewPythonFi le.py|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|# 2261|80|#2267|{ F
AE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4 599|0|PythonFil e.py

And then creating an empty file under C:\Program Files\Microsoft Visual
Studio .NET 2003\VC#\CSharp ProjectItems called "NewPythonFile. py" the item shows up under the "Add New Item" dialog and is added successfully to the project as "NewPythonFile1 .py". Of course who knows what all those numbers and the GUID are for.

The icon in the dialog is the right one, but when added to the project its shown with the generic text icon.

There's probably a better way to do this, but this should get you

started =)


--
_______________ _____
Klaus H. Probst, MVP
http://www.vbbox.com/

"Marina" <nospam> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

When right clicking a project in Solution Explorer, and chosing the
'Add' menu, a bunch of choices come up depending on the project type. So there might be 'Add Module', 'Add Class', 'Add Windows Form', etc.

Is there a way to modify what is on this menu? I would like to include a
custom file type in that menu, that is already defined and appears in the 'Add New Item' dialog box. That way instead of chosing 'Add New Item' and chosing the right file type from the dialog, someone could just chose

it from the menu.

Thanks



Jul 21 '05 #4
Right, the question is what the add-in looks like. The API is very poorely
documented, especially considering everything is just a huge collection of
objects with some sort of name for everything.

What I'm looking for is sample code that would do this...

"Klaus H. Probst" <us*******@vbbo x.com> wrote in message
news:Oe******** ******@TK2MSFTN GP12.phx.gbl...
You'll probably have to write an add-in for that. I can't see where these
menu entries can be modified manually.
--
_______________ _____
Klaus H. Probst, MVP
http://www.vbbox.com/

"Marina" <mz*******@hotm ail.com> wrote in message
news:eN******** ******@TK2MSFTN GP12.phx.gbl...
I already have all this working.

I already have my new template appearing in the Add New Item dialog - I
mentioned this in my post.

What I don't have, is have it as a separate item when you right click on the
project in Solution Explorer, chose Add, and then get the menu options.

The
options in this context menu is what I need to modify.

"Klaus H. Probst" <us*******@vbbo x.com> wrote in message
news:ej******** ******@TK2MSFTN GP09.phx.gbl...
Interesting. I found that this is apparently controlled by a file. Fire up
a
text editor and open C:\Program Files\Microsoft Visual Studio .NET
2003\VC#\CSharp ProjectItems\Lo calProjectItems \LocalProjectIt ems.vsdir
(substitute with your install path). By copying the "new CodeFile.cs" line and modifying it like so:

...\NewPythonFi le.py|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|# 2261|80|#2267|{ F AE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4 599|0|PythonFil e.py

And then creating an empty file under C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\CSharp ProjectItems called "NewPythonFile. py" the item shows up under the "Add New Item" dialog and is added successfully to the project as "NewPythonFile1 .py". Of course who knows what all those numbers and the GUID are for.

The icon in the dialog is the right one, but when added to the project its shown with the generic text icon.

There's probably a better way to do this, but this should get you started
=)


--
_______________ _____
Klaus H. Probst, MVP
http://www.vbbox.com/

"Marina" <nospam> wrote in message
news:uf******** ******@TK2MSFTN GP09.phx.gbl...
> Hi,
>
> When right clicking a project in Solution Explorer, and chosing the

'Add'
> menu, a bunch of choices come up depending on the project type. So

there
> might be 'Add Module', 'Add Class', 'Add Windows Form', etc.
>
> Is there a way to modify what is on this menu? I would like to include
a
> custom file type in that menu, that is already defined and appears

in the
> 'Add New Item' dialog box. That way instead of chosing 'Add New
Item' and
> chosing the right file type from the dialog, someone could just

chose it > from the menu.
>
> Thanks
>
>



Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2205
by: Bizt | last post by:
Hi, I would like to create a menu where the menu options were taken from an XML file. The reason is that I would be able to update the xml file (by simply adding new child nodes) after I uploaded new web pages. Each page would run the same PHP script to create the menu. As the xml file would supply every page, this would mean less time taken up when adding new pages. Below is an example of the xml file content:
1
7356
by: George Rogic | last post by:
Hello: I've done an exhaustive online search and either can't find what I'm looking for or I'm unable to make what I've found work. I'm not a programmer, but I'm sure that this is probably elementary stuff. What I have is a form which is being POSTed to an ASP script which processes the script and emails it to a specified recipient (which is set in a hidden form field).
4
5763
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
5
2631
by: Cecilia Bergengruen | last post by:
2 questions: 1)I inserted a menu in an mdi window form. I right clicked on a menu item and pressed edit names. I therefore edited all my menu item names. Then I right clicked and pressed edit names again to return to the normal view of the menu. When I returned later on to muy menu names, they hadn´t been saved. How do I use this utility (edit names), since the changes I edit don´t prevail? 2) Is there a way to change the font and...
4
264
by: Marina | last post by:
Hi, When right clicking a project in Solution Explorer, and chosing the 'Add' menu, a bunch of choices come up depending on the project type. So there might be 'Add Module', 'Add Class', 'Add Windows Form', etc. Is there a way to modify what is on this menu? I would like to include a custom file type in that menu, that is already defined and appears in the 'Add New Item' dialog box. That way instead of chosing 'Add New Item' and...
1
1830
by: shankwheat | last post by:
I've been using this little script to change the <a href=""></a> value of a link which works well. <script language="javascript" type="text/javascript"> function ordering(sorder) { var link = document.getElementById("mylink").href = "http://www.mysite.com?Option="+sorder; } </script>
2
1385
by: Jason | last post by:
Hi all, I know how to do this the hard way, but I suspect that there's an easier option. I'm creating a program that requires a series of 4 or 6 select menus. Something like this: <select name="1"> <option value="a">A</option>
2
2272
by: Ravi Joshi | last post by:
The menu on my site works fine in IE6 and Firefox. In IE7, there is a problem with the menu: when you mouse over the various main catagories, the sub-catagories all appear to the right as they should; however, as soon as you mouse towards any but the TOP sub-catagory, all those sub-catagories still view there. It will work first time quite fine..but if user clicks outsite anywhere in screen then this problem occur.. i think it's css...
9
1779
by: Anic297 | last post by:
Hello, I'm a newbie in php. I would like to show a popup menu on my website and update the page when the user has changed its selection. I have looked over the Internet but haven't found what I want (apparently, "Popup menu" is not the correct term, but it's the one I use in "desktop" programming). Can someone point me in the right direction?
0
8443
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7385
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6192
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1772
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.