Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / December 2004

Tip: Looking for answers? Try searching our database.

New Project Item

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mythran - 06 Dec 2004 17:26 GMT
I have a VB.Net AddIn that I'm developing.  I have a bunch of custom project
items being listed on the Local Project Items list.  When the user
right-clicks on the project in the solution explorer, a custom menu item
appears on the context menu and it expands into another custom list which
shows my project items.  Now, when I click on this item, I can add the
clicked project item to the project and open it but I want to mimic the "Add
Class" context item where it opens the "Add New Item" dialog and has my item
selected (but doesn't create it until the user selects it, enters the name,
and click's "Open").

Anyone know how I can accomplish this?

I've tried the File.AddNewItem command but it doesn't except
parameters...even though it opens the correct dialog...tried other commands
too with no success...the one command I found that would work, doesn't
accept parameters :(

Thanks,
Mythran
Mythran - 07 Dec 2004 21:08 GMT
>I have a VB.Net AddIn that I'm developing.  I have a bunch of custom
>project items being listed on the Local Project Items list.  When the user
[quoted text clipped - 15 lines]
> Thanks,
> Mythran

Nobody knows how to do the above?

Mythran
back2grid - 07 Dec 2004 22:47 GMT
Hi,
I'm just starting the same project as you are. I have created a custom class
type. Now i want to have that class type as a custom menu item in the context
menu of a project or a folder inside the project. Can you provide me some
info regarding that since you already have that thing working. The next would
be to tackle the same problem your having. i need to start-yp my own winform
wizard for my item.

thanks

> >I have a VB.Net AddIn that I'm developing.  I have a bunch of custom
> >project items being listed on the Local Project Items list.  When the user
[quoted text clipped - 19 lines]
>
> Mythran
back2grid - 08 Dec 2004 16:07 GMT
Hi,
I created the context menu for my project item. i could not find a way to
tie in into the

public void Execute(object Application, int hwndOwner, ref object[]
ContextParams, ref object[] CustomParams, ref EnvDTE.wizardResult retval)
       
call you usually use when somebody selects my project item type after
selecting add new item.

Since my project item requires lot of user-entered data, i have created a
win-forms wizard app. for data entry. i'm going to just run the app inside the

public void Exec(string commandName, EnvDTE.vsCommandExecOption
executeOption, ref object varIn, ref object varOut, ref bool handled)
       
method.

hope this helps

> Hi,
> I'm just starting the same project as you are. I have created a custom class
[quoted text clipped - 29 lines]
> >
> > Mythran
Mythran - 08 Dec 2004 16:50 GMT
> Hi,
> I created the context menu for my project item. i could not find a way to
[quoted text clipped - 16 lines]
>
> hope this helps

Oh, I'm not using Execute for this part of the project.  I implemented the
IDTWizard on another part.  This project I'm working on now is tying in
Commands and CommandBarControls into the context menu and trying to figure
out how to open the "Add Project Item" and select the file type I want
selected....the wizards (vsz) files I have I created for the project
earlier.

Which part did you need help with?

Mythran
back2grid - 08 Dec 2004 17:11 GMT
thx for the reply.
is there any way i could use my own custom jpeg next to the context menu text?

Also i have created a project item type. when selected through add new item,
after the the user gives the file name, i start-up my own wizard and gets
other data from user. what i'm planning to do is, in the same project, add
the new connect class implementing "Extensibility.IDTExtensibility2,
IDTCommandTarget" with the same progID as the one before add new item->my
project item. in the exec method i'm going to run my winforms wizard.
although in this case i've to have one extra control to take the project item
name and go on.

will this case work. also when making deployment versions, i just dump the
DLL and TLB files at the appropriate locations. now i have to make some new
registry entries for the context menu. but hoping it should work

> > Hi,
> > I created the context menu for my project item. i could not find a way to
[quoted text clipped - 27 lines]
>
> Mythran
Mythran - 08 Dec 2004 19:31 GMT
> thx for the reply.
> is there any way i could use my own custom jpeg next to the context menu
[quoted text clipped - 15 lines]
> new
> registry entries for the context menu. but hoping it should work

I believe that you can only use bitmaps stored in the add-in's satellite dll
in order to place images inside your menu item (as quite a few of the
standard menus items show).  I am still working on pulling my image resource
id's from the vsdir files and using those...but since I don't have a custom
satellite dll, and all my code files are custom classes...I want to use some
of the default icons (class, module, et cetera).  So I'm trying to make the
default vb satellite my add-in's satellite.

Your scenario should work.  I see no reason why it wouldn't.

Mythran
emergence consultant benin - 09 Dec 2004 08:23 GMT
"Mythran" <kip_potter@hotmail.comREMOVETRAIL> wrote:
"back2grid" <back2grid@discussions.microsoft.com> wrote in message
> news:6549A7AA-FD9F-40EB-B5D3-31330223C415@microsoft.com...
> > thx for the reply.
> > is there any way i could use my own custom jpeg next to the context menu

> > text?
> >
> > Also i have created a project item type. when selected through add new

> > item,
> > after the the user gives the file name, i start-up my own wizard and gets
> > other data from user. what i'm planning to do is, in the same project,
add
> > the new connect class implementing "Extensibility.IDTExtensibility2,
> > IDTCommandTarget" with the same progID as the one before add new item->my
> > project item. in the exec method i'm going to run my winforms wizard.
> > although in this case i've to have one extra control to take the project

> > item
> > name and go on.
> >
> > will this case work. also when making deployment versions, i just dump
the
> > DLL and TLB files at the appropriate locations. now i have to make some

> > new
> > registry entries for the context menu. but hoping it should work

We have the same problem, but we suggest that it's not so a good way to make
some registry entries...

e-Mergence Consultant,
[SMS-Informatique-Internet-Telecom]
Cotonou,
R?p. du B?nin

> I believe that you can only use bitmaps stored in the add-in's satellite
dll
> in order to place images inside your menu item (as quite a few of the
> standard menus items show).  I am still working on pulling my image resource

> id's from the vsdir files and using those...but since I don't have a custom

> satellite dll, and all my code files are custom classes...I want to use some

> of the default icons (class, module, et cetera).  So I'm trying to make the

> default vb satellite my add-in's satellite.
>
> Your scenario should work.  I see no reason why it wouldn't.
>
> Mythran

-----------------------------------------------------
This message was posted using http://www.gdse.com/
back2grid - 09 Dec 2004 16:17 GMT
Hi,
the registry entries will be made by the AddInnSetup project. but in the
future i'm thinking of putting all the entires myself. We have two product
types one .NET and Java. I developed an installer that will install either or
it and on different O/S (for java) through a single install file. I'm
planning to make the Visual Studio Integration (custom project type, project
item type etc) as part of the installer. So when installing .NET version, a
user will also have an option to install the VS integration project.
In this case i need to dump the Dll's and TLB's and have to make some
registry entires myself.

> "Mythran" <kip_potter@hotmail.comREMOVETRAIL> wrote:
> "back2grid" <back2grid@discussions.microsoft.com> wrote in message
[quoted text clipped - 52 lines]
> -----------------------------------------------------
> This message was posted using http://www.gdse.com/
back2grid - 09 Dec 2004 17:35 GMT
have you tried this in the exec method.

applicationObject.LaunchWizard("VSZ file name", contextParams);

i am right now trying to set the contextparams[] correctly.

> I have a VB.Net AddIn that I'm developing.  I have a bunch of custom project
> items being listed on the Local Project Items list.  When the user
[quoted text clipped - 15 lines]
> Thanks,
> Mythran

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.