tailieunhanh - Developing Visual Studio .NET Macros and Add-Ins phần 3

Một khía cạnh thú vị của Visual NET Studio là bạn có thể chọn nếu bạn muốn cửa sổ tài liệu của bạn đến được tab cửa sổ hoặc cửa sổ MDI (MDI là viết tắt của giao diện tài liệu Nhiều). (Điều này chỉ áp dụng cho các cửa sổ văn bản, chứ không phải cửa sổ công cụ.) | Introducing the Visual Studio Macro IDE 57 Explorer. The difference is that in the latter section I discuss how to manage your projects using the Macro Explorer in the main IDE here I show you how to manage your project using the Macros IDE. However there are certain things you can do only from within the main IDE through either the Macro Explorer or the menu items. These are Create a new project. Load a project. Unload a project. Since I show you later how to do these three tasks using the Macro Explorer now I ll show you how to do them using the menus. Remember however that these are the menus in the main IDE not in the Macros IDE. Why can t life be less complicated A The Macros IDE is aware of an active project. You can tell which project is currently active by looking at the title bar of the IDE window. The title will start with the name of your project followed by a hyphen followed by the words Microsoft Visual Studio Macros. Creating a New Project To create a macro project you must use the main IDE. To do so choose Tools1 -Macros1 -New Macro Project. The New Macro Project dialog box will open. The only template available by default is Macro Project. Make sure the Macro Project template icon is highlighted. Then enter the name of your project in the text box labeled Name. Next choose a directory in which to place your project. When you create a new macro project the Open dialog box creates a new directory for the project just like the main IDE which creates directories for you. The new directory has the same name as your project file but without the .vsmacros extension. After you create the new project when you switch back to the Macros IDE you will see the project in the Project Explorer. Loading and Unloading Projects Like creating a macro project you can only load and unload projects from the main IDE. Remember the main IDE maintains a list of macro projects that are currently loaded. These are the macro projects that you or your IDE users can access while