Chapter 16. Developing Windows Applications

Chapters 1619 show how you can use the C# language to create a different type of application. This chapter tackles Windows application development. The best way to learn a language is to actually work on a real project from the beginning to deployment. So, this chapter leads you through creating a Windows application that performs some useful tasks and then shows you how to deploy it using a technique in Visual Studio known as ClickOnce.

Specifically, the Windows application you build in this chapter demonstrates how to:

  • Programmatically access FTP servers using the FtpWebRequest and FtpWebResponse classes (both derived from the WebRequest and WebResponse classes in the System.Net namespace)

  • Incorporate printing capability in your Windows application using the PrintDocument class (located in the System.Drawing.Printing namespace)

  • Deploy a Windows application using ClickOnce. You will also see how to programmatically cause an application to update itself.

The Project

The project in this chapter is a photo viewer Windows application that accesses an FTP server. Using this application, users can upload photos to an FTP server and also download and view images stored on the FTP server. The application is useful for companies that may need to access images uploaded by their partners. Insurance companies, for instance, may need to access photographs of car damage taken by auto body shop mechanics to facilitate estimating the cost of repair. Rather ...

Get C# 2008 Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.