TAILIEUCHUNG - Developing Visual Studio .NET Macros and Add-Ins phần 10

Các đối tượng Office bao gồm một số sự kiện mà mã của bạn có thể đáp ứng. Ví dụ, đối tượng bao gồm một sự kiện được gọi là WorkbookOpen, xảy ra khi người sử dụng Excel mở ra một bảng tính hoặc khi một chương trình tự động hóa gây ra Excel để mở một bảng tính. | 344 Chapter 15 similar to the Macro Explorer that lists scripts in other languages enabling you to double-click the scripts in this window to run them. The add-in I describe here does just that. It has a tool window containing a treeview control that lists the scripts in a given directory. If you double-click the script the script runs. Like many of the previous add-ins this one uses the VSUserControlHost that I described in Using the Form Designer with a Tool Window in Chapter 7. And as for the other add-ins be sure to add a COM reference to the VSUserControlHost Type Library. Here s the Connect module for the add-in Imports imports Extensibility imports Imports EnvDTE GuidAttribute F3D6C34F-CCDB-4D03-94D3-C9E5A15A9491 ProgIdAttribute _ Public Class Connect W vs Implements Implements IDTCommandTarget Note I changed applicationObject to public shared Public Shared applicationObject As Dim addInInstance As Private doc As Nothing Private toolwin As Window Nothing Public Sub OnBeginShutdown ByRef custom As _ Implements End Sub Public Sub OnAddInsUpdate ByRef custom As _ Implements End Sub Public Sub OnStartupComplete ByRef custom As _ Implements End Sub Public Sub OnDisconnection ByVal RemoveMode As _ ByRef custom As _ Implements End Sub Public Sub OnConnection ByVal application As Object _ ByVal connectMode As _ ByVal addInInst As Object ByRef custom As _ Implements Team-Fiy Integrating with Other Products 345 applicationobject .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.