|
C# 2008 Programmer's ReferenceSelect File Transfer Protocol (FTP) Service, and click OK. To configure the FTP service on your computer, launch the Internet Information Services management console window by typing the command inetmgr in the Run window. Your FTP site should look like Figure 16-2. Figure 16-2 Right-click the Default FTP Site item, and select Properties. Click the Security Accounts tab. Ensure that the Allow Anonymous Connections checkbox is checked (see Figure 16-3) to enable an anonymous user to log in to your FTP service. Figure 16-3 Next, click on the Home Directory tab, and check the Write checkbox (see Figure 16-4). This allows users to your FTP service to upload files and create directories on the FTP server. Figure 16-4 Click OK to finish the configuration of the FTP service. Creating the Application Using Visual Studio 2008, create a new Windows application and name it PhotoViewer. Populate the default Form1 with the controls shown in Figure 16-5. These controls are: Control Text Name Button controls (4) Create Folder btnCreateFolder Remove Folder btnRemoveFolder Upload Photos btnUploadPhotos Delete Photo btnDeletePhoto GroupBox controls (3) FTP Server Folders Photos Label controls (6) Server Name/IP User Name Password Select folder New folder name Selected Photo PictureBox PictureBox1 TextBox controls (4) txtFTPServer txtUserName txtPassword txtNewFolderName ToolStripStatusLabel ToolStripStatusLabel1 ToolStripStatusLabel1 TreeView TreeView1 Figure 16-5 The source code for this project can be downloaded from Wrox's web site at www.wrox.com ...» |
Код для вставки книги в блог HTML
phpBB
текст
|
|