locked
using an Addin RRS feed

  • Question

  • How to use an Addin

     

    By using the Visual Studio Extensibility feature I created a Visual Studio Addin.(Say MyAddin1)

    After that, when I run the Addin it displays the name MyAddin1 in the Tools menu.

    Its ok

     

    Then;

    I have created a Normal Windows Application. (say WinApp1)

    In there (in WinApp1), it has a Form1.cs

    And I changed its(Form1.cs) background color to brown.

     

    Now, what I want to do, is to call (invoke) this WinApp1 , when the MyAddin1(in the Tools menu) is clicked.

    How can I do this….

    (So when clicked it should appear the WinApp1 with the brown color Form.)

     

    And also; when the Form1.cs appears (When WinApp1 project opens), we should be able to work as with it as a Normal Windows Application.

    (Normally in the sense, we should be able to drag and drop default windows tools to the Form1.cs).

     

    Simply what I want is to;

    Open a Already saved Windows Application, when click the name of the Addin. (name of the Addin appear under tools menu)


    pls provide a sample code or a demo 

    Is it possible to such a thing!


    need help!
    Friday, August 31, 2007 9:28 AM

Answers

  • Hi ugp,

    Please check out the following code:

    Code Snippet

    // Open the project by its path

    DTE.Solution.Open("c:\FengChen\Projects\FormsTest\FormsTest.sln");

    // Open the specified project item by name:

    DTE.Windows.Item("MainForm.cs [Design]").Activate();

     

     

    Hope this helps!

    Thanks!

    Monday, September 3, 2007 8:14 AM

All replies

  • Hi ugp,

    Please check out the following code:

    Code Snippet

    // Open the project by its path

    DTE.Solution.Open("c:\FengChen\Projects\FormsTest\FormsTest.sln");

    // Open the specified project item by name:

    DTE.Windows.Item("MainForm.cs [Design]").Activate();

     

     

    Hope this helps!

    Thanks!

    Monday, September 3, 2007 8:14 AM
  • Hi, i am looking to do the same thing. Were you able to accomplish this??? how??
    I am working on Visual Studio 2008 with C#.

    Thanks.
    Monday, January 5, 2009 8:06 AM