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?]”
相關文章 : C# 文字方塊使用屬性設定唯讀 文字顏色無法正確顯示的BUG解決方法(C# textbox readonly color)
https://bit.ly/3Q6OTDR