![]() |
|
|
在Windows 结果如下:
C#代码如下: using System;
public Form1() #region Windows Form Designer generated code // // label1 // this.label1.ForeColor = System.Drawing.Color.Red; this.label1.Location = new System.Drawing.Point(8, 96); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(448, 16); this.label1.TabIndex = 0; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // txtServerPath // this.txtServerPath.Location = new System.Drawing.Point(128, 8); this.txtServerPath.Name = "txtServerPath"; this.txtServerPath.Size = new System.Drawing.Size(320, 21); this.txtServerPath.TabIndex = 1; this.txtServerPath.Text = "http://mengxianhui/<a href="/" target="_blank">ASP</a>xWeb/Images/"; // // label2 // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134))); this.label2.ForeColor = System.Drawing.Color.Navy; this.label2.Location = new System.Drawing.Point(8, 12); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(116, 17); this.label2.TabIndex = 2; this.label2.Text = "请输入<a href="/" target="_blank">服务器</a>地址:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // button1 // this.button1.Location = new System.Drawing.Point(192, 64); this.button1.Name = "button1"; this.button1.TabIndex = 3; this.button1.Text = "上载文件"; this.button1.Click += new System.EventHandler(this.button1_Click); this.button1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.button1_MouseDown); // // txtFileName // this.txtFileName.Location = new System.Drawing.Point(128, 32); this.txtFileName.Name = "txtFileName"; this.txtFileName.Size = new System.Drawing.Size(232, 21); this.txtFileName.TabIndex = 4; this.txtFileName.Text = ""; // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134))); this.label3.ForeColor = System.Drawing.Color.DarkBlue; this.label3.Location = new System.Drawing.Point(8, 38); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(116, 17); this.label3.TabIndex = 5; this.label3.Text = "请输入上传文件名:"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // button2 // this.button2.Location = new System.Drawing.Point(370, 32); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(80, 23); this.button2.TabIndex = 6; this.button2.Text = "浏览文件…"; this.button2.Click += new System.EventHandler(this.button2_Click); // // linkLabel1 // this.linkLabel1.Location = new System.Drawing.Point(16, 120); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.Size = new System.Drawing.Size(440, 24); this.linkLabel1.TabIndex = 7; this.linkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.BackColor = System.Drawing.SystemColors.Control; this.ClientSize = new System.Drawing.Size(464, 157); this.Controls.Add(this.linkLabel1); this.Controls.Add(this.button2); this.Controls.Add(this.txtFileName); this.Controls.Add(this.label3); this.Controls.Add(this.txtServerPath); this.Controls.Add(this.label2); this.Controls.Add(this.button1); this.Controls.Add(this.label1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "Form1"; this.Text = "WebClient 上传文件的例子"; this.Resize += new System.EventHandler(this.Form1_Resize); this.ResumeLayout(false); } 上一篇:C#中改变显示器的分辨率 下一篇:.NET中嵌入和使用资源文件
|