C# Label 文字選取複製 (TextBox 偽裝成 Label​)[Is it possible to select text on a Windows form label?]

C# Label 文字選取複製 (TextBox 偽裝成 Label​)[Is it possible to select text on a Windows form label?]

C# Label 文字選取複製 (TextBox 偽裝成 Label)[Is it possible to select text on a Windows form label?]


資料來源: https://stackoverflow.com/questions/7748137/is-it-possible-to-select-text-on-a-windows-form-label

GOOGLE 關鍵字:C # Label TEXT copy


教學程式碼:

TextBox1.Text = "Hello, Select Me";
TextBox1.ReadOnly = true;
TextBox1.BorderStyle = 0;
TextBox1.BackColor = this.BackColor;
TextBox1.TabStop = false;

實作程式碼:

private System.Windows.Forms.TextBox labV09deviceShowl01;

this.labV09deviceShowl01 = new System.Windows.Forms.TextBox();

this.labV09deviceShowl01.BackColor = System.Drawing.SystemColors.Window;
this.labV09deviceShowl01.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.labV09deviceShowl01.Location = new System.Drawing.Point(240, 90);
this.labV09deviceShowl01.Name = "labV09deviceShowl01";
this.labV09deviceShowl01.ReadOnly = true;
this.labV09deviceShowl01.Size = new System.Drawing.Size(283, 22);
this.labV09deviceShowl01.TabIndex = 11;
this.labV09deviceShowl01.TabStop = false;
this.labV09deviceShowl01.Text = "label1";

One thought on “C# Label 文字選取複製 (TextBox 偽裝成 Label​)[Is it possible to select text on a Windows form label?]

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *