Results 1 to 10 of 10

Thread: How to add custom form to the Add options

  1. #1

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681

    How to add custom form to the Add options

    Does anyone know how to add a Custom Form (say myCustomForm) to the Add dialog box that you get when you right click on your project and select "Add New Item"?

    Thanks.

  2. #2
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    Have you tried Add -> Add Existing Item... and then browsing for your form? I dunno, maybe I am not understand what you're asking.

  3. #3

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    I would like to be able to Add my custom form just like you add a new form to a project. Instead of browsing, etc.

    So when you right click on the project in the Solution Explorer I would have the option of adding my custom form right from the menu that pops up

    OR

    When you right click on the project in the Solution Explorer I would select the option of add item, and then my custom form would be one of the options to add.

    Hope that is clearer.

    Thanks!

  4. #4
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    You want to customize the context menu for Solution Explorer? You probably can but I can't find the menu option for it. I don't see a command for Project -> Add Existing for that matter. ^_^ Hope you figure it out.

  5. #5
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    I dug around in the macro recorder a bit and found that the internal command to add existing is:

    DTE.ItemOperations.AddExistingItem("[path+filename]")

    If you record/write a macro with this command in it, it's a simple matter to assign that to a keyboard command (you probably know this) - how to get it to appear in the context menu I don't know.

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    It has something to do with the files in the VBProjectItems folder under the vb7 directory of the VS .NET directory.

    Takie a look at them and see if you can make heads or tails of them.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    Thanks for the input - I will see what I can do. Will let you know...

  8. #8
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    here is some how to info. It is for html templates, but it is the same thing

    http://aspfree.com/aspnet/vstemplate.aspx
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  9. #9

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    Thanks for the input - it is working great!!!

  10. #10
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    Thumbs up

    Cool.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width