Windows 7 Sample KB Articles

 

How to create a trigger-start Windows service in Windows 7

Windows Server 2008 R2 and Windows 7 introduce a new feature that is known as the trigger-start service. This code sample shows how to create a trigger-start service that starts when a generic USB disk becomes available. The sample also shows how to create a trigger-start service that starts a service when the first IP address on the TCP/IP networking stack becomes available. The sample also shows how to create a trigger-stop service that stops a service when the last IP address on the TCP/IP networking stack becomes unavailable. These start and stop events are reported in the Application log.

 

How to programmatically manipulate Windows 7 shell libraries

This sample includes a step-by-step guide about how to programmatically manipulate Windows 7 shell libraries. You can learn basic steps about how to create, open, delete, rename, and manage shell libraries. These sample projects also show how you can add, remove, and list folders in a shell library.

 

Silverlight Samples KB

 

How to use Pixel Shader Effects in Silverlight 3

Pixel Shader Effects is a new feature of Silverlight 3. This code sample includes a step-by-step guide of creating a Silverlight 3 application that explores this new feature. The following screenshot illustrates the effect of this sample code. From the screenshot, you can find that a watery ellipse appears when you click on the picture after you create the sample Silverlight 3 application:

 

 

 

Office Samples KB

 

How to create and manipulate Microsoft Excel by using Office Automation in Visual C++, Visual C# and Visual Basic.NET

 

This code sample demonstrates how to create and manipulate Excel by using Automation from Visual C++, Visual C# and Visual Basic.NET.  It automates Microsoft Excel to perform the following operations in Visual C++, Visual C# and Visual Basic.NET.

 

  1. Create a Microsoft Excel instance.
  2. Create a new workbook.
  3. Fill data into a range. 
  4. Save the workbook. 
  5. Close the Microsoft Excel instance, and then clean up unmanaged COM resources.

 

How to create and manipulate an Office PowerPoint instance by using Office Automation in Visual C++, in Visual C#, and in Visual Basic.NET

This code sample includes a step-by-step guide for creating and manipulating a Microsoft Office PowerPoint instance by using Office Automation in Visual C++, in Visual C#, and in Visual Basic.NET.  It automates Office PowerPoint to perform the following operations in Visual C++, in Visual C#, and in Visual Basic.NET.

 

  1. Create an Office PowerPoint instance.
  2. Create a new presentation.
  3. Insert a new slide. 
  4. Add text to the slide.
  5. Save the presentation. 
  6. Close the Office PowerPoint instance, and then clean up unmanaged COM resources.

 

How to create and manipulate an instance of Office Word by using Office Automation in Visual C++, in Visual C#, and in Visual Basic.NET

This code sample includes a step-by-step guide for creating and manipulating a Microsoft Office Word instance by using Office Automation in Visual C++, in Visual C#, and in Visual Basic.NET. It automates Office Word to perform the following operations by using Visual C++, Visual C#, and Visual Basic.NET:

  1. Create an instance of Office Word.
  2. Create a new document.
  3. Insert a paragraph.
  4. Save the document.
  5. Close the Office Word instance, and then clean up unmanaged COM resources.

 

How to make Office VBA code interact with a VSTO application-level add-in

 

This code sample includes a step-by-step guide about how to make Office Visual Basic for Applications (VBA) interact with a Microsoft Visual Studio Tools for Office System (VSTO) add-in.

 

How to use the Excel Automation Addin to create user defined formulas for Microsoft Office Excel

 

This code sample includes a step-by-step guide about how to use the Excel Automation Addin to create user defined formulas for Microsoft Office Excel. The All-In-One Code Framework samples in this KB article show you how to develop an Excel Automation Addin by using Visual C#.NET and Visual Basic.NET.

 

 

ASP.NET Samples KB

 

How to use HotSpot regions in the ImageMap control in ASP.NET

 

This article describes an All-In-One Code Framework sample that demonstrates a step-by-step guide illustrating how to use HotSpot regions in the ImageMap control in ASP.NET to build an introduction page for the Solar System. Users can click the planet in the image to navigate the iframe to the corresponding page of the planet on Wikipedia Web site.

 

ADO.NET Samples KB

 

How to work with table relationships and entity inheritances in ADO.NET Entity Data Model

 

This code sample includes a step-by-step guide about how to work with Entity Data Model in various ways, including One-to-Many association, Many-to-Many association, One-to-One association, table merging, table splitting, Table-per-Hierarchy inheritance, and Table-per-Type inheritance.

 

COM Samples KB

 

How to develop an in-process COM component

 

This sample includes a step-by-step guide that shows how to develop an in-process COM component by using Visual C++, Visual C#, or Visual Basic .NET.

 

How to develop an out-of-process COM component by using Visual C++, Visual C#, or Visual Basic.NET

 

This code sample includes a step-by-step guide about how to develop an out-of-process COM server by using Visual C++, Visual C#, or Visual Basic .NET.