[英]Where is the form icon saved in a WinForms application?
在設計器中打開您的表單。 打開屬性框。 單擊表格以選擇它。 在“窗口樣式”組的“屬性”框中查找“圖標”元素。
如果通過“屬性”框更改圖標,然后查看設計器代碼,則會看到以下內容(Form1.Designer.cs):
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1008, 540);
this.Controls.Add(this.btnTestReplacePerformance);
this.Controls.Add(this.label3);
this.Controls.Add(this.txtResults);
this.Controls.Add(this.btnGetMatches);
this.Controls.Add(this.txtSource);
this.Controls.Add(this.txtRegex);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
this.PerformLayout();
您會看到圖標(this.Icon)是從資源中加載的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.