TAILIEUCHUNG - Visual Basic 2005 Design and Development - Chapter 8

Snippets, Macros, and Add-ins Visual Studio cung cấp nhiều công cụ khiến cho việc viết code dễ dàng hơn. Chương này mô tả ba công cụ mà bạn có thể sử dụng để tự động tạo ra mã đoạn, macro, và thêm các plug-. Đoạn cho phép bạn sao chép một đoạn mã vào một ứng dụng. Sau khi bạn chèn mã, công cụ chỉnh sửa đoạn mã cho phép bạn thực hiện đơn giản thay thế hệ thống để tùy chỉnh mã mới. Macros cho phép bạn ghi lại hành động bạn thực hiện trong một trình soạn. | Part II Meta-Development In this Part Chapter 8 Snippets Macros and Add-ins Chapter 9 Scripting Chapter 10 Custom Controls and Components Chapter 11 Property Support Chapter 12 Attributes and XML Comments Snippets Macros and Add-ins Visual Studio provides many tools that make writing code easier. This chapter describes three tools that you can use to automatically generate code snippets macros and add-ins. Snippets let you copy a piece of code into an application. After you insert the code snippet-editing tools let you make simple systematic replacements to customize the new code. Macros let you record actions you perform in a code editor and replay them later. By itself that would only be useful if you needed to repeat the exact same series of operations. By editing the recorded macro however you can generate new code in very complicated ways. Like macros add-ins let you generate complicated pieces of code. Add-ins have the additional advantage that they are compiled so you can write an add-in for developers while not allowing them to view or modify it. Because an add-in is a Visual Studio project in its own right it can take advantage of the full power of the development environment. Snippets An IntelliSense code snippet or just snippet is a piece of code stored in a special XML format so it is easy to insert into your applications. Visual Studio comes with several hundreds of pre-built snippets that you can use to generate code for such tasks as activating a running application clearing the console window creating a sorted dictionary or calculating the sine of an angle Many of the pre-built snippets are quite simple. For example the following code shows the snippet that calculates the sine of an angle Dim radians As Double 120 180 Dim sin As Double radians

TỪ KHÓA LIÊN QUAN
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.