search
尋找貓咪~QQ 地點 桃園市桃園區 Taoyuan , Taoyuan

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

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";



熱門推薦

本文由 jashliaoeuwordpress 提供 原文連結

寵物協尋 相信 終究能找到回家的路
寫了7763篇文章,獲得2次喜歡
留言回覆
回覆
精彩推薦